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
网友评论