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