update
This commit is contained in:
@@ -23,11 +23,13 @@ export const useSystemStore = defineStore('SystemStore', () => {
|
||||
messageCount.value.one = count;
|
||||
messageCount.value.two = message.value.filter(v => !v.is_read).length;
|
||||
|
||||
document.querySelectorAll('.uni-tabbar__item__dot').forEach(v => v.remove());
|
||||
// 生成角标
|
||||
if (messageCount.value.one + messageCount.value.two > 0) {
|
||||
const tabbar = document.querySelectorAll('.uni-tabbar__item')[2].querySelector('.uni-tabbar__bd');
|
||||
tabbar.style.position = 'relative';
|
||||
const div = document.createElement('div');
|
||||
div.className = 'uni-tabbar__item__dot';
|
||||
div.style.position = 'absolute';
|
||||
div.style.backgroundColor = 'red';
|
||||
div.style.color = 'white';
|
||||
|
||||
Reference in New Issue
Block a user