1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

切换页面后返回,下方导航栏active没有更新问题修复

This commit is contained in:
程序员小墨 2022-07-29 17:48:54 +08:00
parent 636033fa57
commit f3e47b16d0
2 changed files with 6 additions and 1 deletions

View File

@ -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>`);

View File

@ -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');