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