Notification.vue 1.3 KB

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