mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 19:09:21 +08:00
fix: 优化 TagsView 后导致 tag 显示顺序错乱 (#124)
This commit is contained in:
parent
07f321ecbb
commit
1ef54abc1e
@ -36,10 +36,7 @@ const handleLink = (item: RouteLocationMatched) => {
|
||||
listenerRouteChange((route) => {
|
||||
if (route.path.startsWith("/redirect/")) return
|
||||
getBreadcrumb()
|
||||
})
|
||||
|
||||
/** 初始化面包屑导航信息 */
|
||||
getBreadcrumb()
|
||||
}, true)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -149,17 +149,16 @@ const closeMenu = () => {
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
/** 监听路由变化 */
|
||||
listenerRouteChange((route) => {
|
||||
addTags(route)
|
||||
}, true)
|
||||
|
||||
watch(visible, (value) => {
|
||||
value ? document.body.addEventListener("click", closeMenu) : document.body.removeEventListener("click", closeMenu)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
initTags()
|
||||
/** 监听路由变化 */
|
||||
listenerRouteChange(async (route) => {
|
||||
addTags(route)
|
||||
}, true)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user