message.vue 650 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <v-badge
  3. color="error"
  4. :content="IM.unreadCount"
  5. :model-value="IM.unreadCount > 0"
  6. offset-y="10"
  7. >
  8. <v-btn class="ml-1" size="small" icon="mdi-bell-outline" @click="router.push(path)"></v-btn>
  9. </v-badge>
  10. </template>
  11. <script setup>
  12. defineOptions({ name: 'layout-message' })
  13. import { useIM } from '@/hooks/web/useIM'
  14. import { useIMStore } from '@/store/im'
  15. import { useRouter } from 'vue-router'
  16. defineProps({
  17. path: {
  18. type: String,
  19. default: '/recruit/personal/message'
  20. }
  21. })
  22. const router = useRouter()
  23. const IM = useIMStore()
  24. // useDataSource()
  25. useIM()
  26. </script>
  27. <style lang="scss" scoped>
  28. </style>