Template
1
0
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:
pany 2024-11-08 19:37:09 +08:00 committed by GitHub
parent 0dd7c170ab
commit 6df0470836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>