mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 19:09:21 +08:00
perf: 代码优化 components/Notify
This commit is contained in:
parent
2a79acc59a
commit
9c7fd02fb7
@ -15,11 +15,7 @@ interface DataItem {
|
||||
|
||||
/** 角标当前值 */
|
||||
const badgeValue = computed(() => {
|
||||
let value = 0
|
||||
for (let i = 0; i < data.value.length; i++) {
|
||||
value += data.value[i].list.length
|
||||
}
|
||||
return value
|
||||
return data.value.reduce((sum, item) => sum + item.list.length, 0)
|
||||
})
|
||||
/** 角标最大值 */
|
||||
const badgeMax = 99
|
||||
|
Loading…
x
Reference in New Issue
Block a user