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.

45 lines
956 B

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