Notification.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <v-menu offset-y>
  3. <template v-slot:activator="{ on, attrs }">
  4. <v-tooltip bottom>
  5. <template v-slot:activator="{ on, attrs }">
  6. <v-btn icon
  7. v-bind="attrs"
  8. v-on="on"
  9. >
  10. <v-icon class="ot_white--text" small>fa-bell</v-icon>
  11. </v-btn>
  12. </template>
  13. <span>{{ $t('notification') }}</span>
  14. </v-tooltip>
  15. </template>
  16. <v-list dense>
  17. <template v-for="(item, index) in properties.menu">
  18. <v-list-item :key="item.title">
  19. <v-list-item-title v-text="$t(item.title)"></v-list-item-title>
  20. </v-list-item>
  21. <v-divider
  22. v-if="index < properties.menu.length - 1"
  23. :key="index"
  24. ></v-divider>
  25. </template>
  26. </v-list>
  27. </v-menu>
  28. </template>
  29. <script lang="ts">
  30. import {$useMenu} from '@/use/layout/menu'
  31. import {defineComponent, reactive, Ref} from '@nuxtjs/composition-api'
  32. import {AnyJson} from "~/types/interfaces";
  33. import {UnwrapRef} from "@vue/composition-api";
  34. export default defineComponent({
  35. setup() {
  36. const menu:Ref<any> = $useMenu.setUpContext().useConfigurationMenuConstruct()
  37. const properties:UnwrapRef<AnyJson> = reactive({
  38. menu: menu
  39. })
  40. return {
  41. properties
  42. }
  43. }
  44. })
  45. </script>
  46. <style scoped>
  47. </style>