切换页面后返回,下方导航栏active没有更新问题修复
This commit is contained in:
parent
636033fa57
commit
f3e47b16d0
@ -20,6 +20,9 @@
|
||||
|
||||
td {
|
||||
font-size: 12px;
|
||||
|
||||
max-width: 160px;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -358,7 +361,7 @@
|
||||
<!-- up_from_v2 -->
|
||||
<td>${hotBand.up_from_v2}</td>
|
||||
<!-- others -->
|
||||
<td>${JSON.stringify(hotBand.others)}</td>
|
||||
<td><div style="max-height: 200px; overflow: scroll;"><span>${JSON.stringify(hotBand.others)}</span></div></td>
|
||||
</tr >`);
|
||||
}
|
||||
str.push(`</tbody>`);
|
||||
|
@ -170,6 +170,8 @@
|
||||
// 切换页面
|
||||
switchPage(target, false);
|
||||
// 更新下方导航栏选中状态
|
||||
let oldActive = document.querySelector('.active')
|
||||
if (oldActive) oldActive.classList.remove('active');
|
||||
navbarItems.forEach(item => {
|
||||
if (item.getAttribute('targetPage') === target) {
|
||||
item.classList.add('active');
|
||||
|
Loading…
Reference in New Issue
Block a user