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.

46 lines
886 B

5 years ago
4 years ago
5 years ago
  1. <template>
  2. <v-menu
  3. offset-y
  4. open-on-hover
  5. >
  6. <template v-slot:activator="{ on }">
  7. <v-btn
  8. color="primary text-capitalize"
  9. v-on="on"
  10. >
  11. {{ text }}
  12. <v-icon>mdi-menu-down</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>
  32. export default {
  33. props: {
  34. text: {
  35. type: String,
  36. default: 'Actions'
  37. },
  38. items: {
  39. type: Array,
  40. default: () => [],
  41. required: true
  42. }
  43. }
  44. }
  45. </script>