flat:语音功能优化
This commit is contained in:
@@ -46,18 +46,22 @@ export const useReadMsg = defineStore('readMsg', () => {
|
||||
// 设置 TabBar 角标
|
||||
function updateTabBarBadge() {
|
||||
const count = unreadCount.value
|
||||
const index = 3
|
||||
const countVal = count > 99 ? '99+' : String(count)
|
||||
if (count === 0) {
|
||||
uni.removeTabBarBadge({
|
||||
index: 3
|
||||
index
|
||||
}) // 替换为你消息页面的 TabBar index
|
||||
} else {
|
||||
const val = count > 99 ? '99+' : String(count)
|
||||
badges.value[index] = {
|
||||
count: val
|
||||
count: 0
|
||||
}
|
||||
} else {
|
||||
badges.value[index] = {
|
||||
count: countVal
|
||||
}
|
||||
uni.setTabBarBadge({
|
||||
index: 3,
|
||||
text: val
|
||||
index,
|
||||
text: countVal
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user