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.

48 lines
931 B

5 years ago
4 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 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 lang="ts">
  32. import Vue from 'vue'
  33. export default Vue.extend({
  34. props: {
  35. text: {
  36. type: String,
  37. default: 'Actions'
  38. },
  39. items: {
  40. type: Array,
  41. default: () => [],
  42. required: true
  43. }
  44. }
  45. })
  46. </script>