uniapp 顶部导航栏 角标设置与动态修改值

2020-09-17  本文已影响0人  莫名其妙的名字
WeChat0d04bf111b0050147e5135d1920d37b9.png
1.jpg WeChat498458d9699d4b3a6cc2f7daf31a526a.png

另外H5下

 // #ifdef H5  
    if(show){  
        if(index === 0){  
            document.querySelectorAll('.uni-page-head-hd .uni-page-head-btn')[1].classList.add('uni-page-head-btn-red-dot');  
        } else {  
            document.querySelector('.uni-page-head-ft .uni-page-head-btn').classList.add('uni-page-head-btn-red-dot');  
        }  
    } else {  
        if(index === 0){  
            document.querySelector('.uni-page-head-btn-red-dot').classList.remove('uni-page-head-btn-red-dot');  
        } else {  
            document.querySelector('.uni-page-head-ft .uni-page-head-btn-red-dot').classList.remove('uni-page-head-btn-red-dot');  
        }  
    }  
    // #endif 

详细见 https://uniapp.dcloud.io/collocation/pages?id=app-titlenview-splitlinestyles

上一篇下一篇

猜你喜欢

热点阅读