7 天以前 91c82965b2d987452ca276e3a03b48c8dcda2ae9
src/views/im/home/index.vue
@@ -4,7 +4,7 @@
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'
@@ -185,7 +185,7 @@
)
/**
 * 浏览器标签 title 拼上未读数前缀;例:(63条未读)芋道源码
 * 浏览器标签 title 拼上未读数前缀;例:(63条未读)超级管理员
 *
 * 路由切换时 router.afterEach 会调 useTitle 重置 title;用 nextTick 排在它之后再覆盖
 * 一并监听 route.fullPath,IM 子路由切换(消息 / 通讯录)也能重新加上前缀
@@ -194,7 +194,7 @@
  [() => 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
    })
  },