Notification.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 { defineComponent, reactive, Ref, UnwrapRef } from '@nuxtjs/composition-api'
  37. import { $useMenu } from '@/use/layout/menu'
  38. import { AnyJson } from '~/types/interfaces'
  39. export default defineComponent({
  40. setup () {
  41. const menu: Ref<any> = $useMenu.setupContext().useConfigurationMenuConstruct()
  42. const properties: UnwrapRef<AnyJson> = reactive({
  43. menu
  44. })
  45. return {
  46. properties
  47. }
  48. }
  49. })
  50. </script>
  51. <style scoped>
  52. </style>