You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1022 B

5 years ago
3 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <v-menu
  3. offset-y
  4. open-on-hover
  5. >
  6. <template #activator="{ on }">
  7. <v-btn
  8. color="primary text-capitalize"
  9. v-on="on"
  10. >
  11. {{ text }}
  12. <v-icon>{{ mdiMenuDown }}</v-icon>
  13. </v-btn>
  14. </template>
  15. <v-list>
  16. <v-list-item
  17. v-for="(item, index) in items"
  18. :key="index"
  19. @click="$emit(item.event)"
  20. >
  21. <v-list-item-icon>
  22. <v-icon>{{ item.icon }}</v-icon>
  23. </v-list-item-icon>
  24. <v-list-item-content>
  25. <v-list-item-title>{{ item.title }}</v-list-item-title>
  26. </v-list-item-content>
  27. </v-list-item>
  28. </v-list>
  29. </v-menu>
  30. </template>
  31. <script lang="ts">
  32. import Vue from 'vue'
  33. import { mdiMenuDown } from '@mdi/js'
  34. export default Vue.extend({
  35. props: {
  36. text: {
  37. type: String,
  38. default: 'Actions'
  39. },
  40. items: {
  41. type: Array,
  42. default: () => [],
  43. required: true
  44. }
  45. },
  46. data() {
  47. return {
  48. mdiMenuDown
  49. }
  50. },
  51. })
  52. </script>