| | |
| | | import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | import { preferences } from '..\..\..\packages\preferences\src' |
| | | import { preferences } from '#/packages/preferences/src' |
| | | |
| | | import { ImConversationType } from '../utils/constants' |
| | | import { initDb, stopRequests, StorageKeys } from '../utils/db' |
| | |
| | | ) |
| | | |
| | | /** |
| | | * 浏览器标签 title 拼上未读数前缀;例:(63条未读)芋道源码 |
| | | * 浏览器标签 title 拼上未读数前缀;例:(63条未读)超级管理员 |
| | | * |
| | | * 路由切换时 router.afterEach 会调 useTitle 重置 title;用 nextTick 排在它之后再覆盖 |
| | | * 一并监听 route.fullPath,IM 子路由切换(消息 / 通讯录)也能重新加上前缀 |
| | |
| | | [() => conversationStore.getTotalUnreadCount, () => route.fullPath], |
| | | ([count]) => { |
| | | nextTick(() => { |
| | | const base = preferences.app.name |
| | | const base = preferences.copyright.companyName |
| | | document.title = count > 0 ? `(${count > 99 ? '99+' : count}条未读)${base}` : base |
| | | }) |
| | | }, |