Notification.vue 1.3 KB

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