mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-22 03:49:19 +08:00
Update index.vue
This commit is contained in:
parent
0dd7c170ab
commit
6df0470836
@ -65,7 +65,7 @@ const initTags = () => {
|
||||
affixTags = filterAffixTags(permissionStore.routes)
|
||||
for (const tag of affixTags) {
|
||||
// 必须含有 name 属性
|
||||
tag.name && tagsViewStore.addVisitedView(tag)
|
||||
tag.name && tagsViewStore.addVisitedView(tag, true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,12 +153,13 @@ watch(visible, (value) => {
|
||||
value ? document.body.addEventListener("click", closeMenu) : document.body.removeEventListener("click", closeMenu)
|
||||
})
|
||||
|
||||
/** 监听路由变化 */
|
||||
listenerRouteChange((route) => {
|
||||
addTags(route)
|
||||
}, true)
|
||||
|
||||
onMounted(() => {
|
||||
initTags()
|
||||
/** 监听路由变化 */
|
||||
listenerRouteChange(async (route) => {
|
||||
addTags(route)
|
||||
}, true)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user