fix: 🐛 修复 ts 类型警告问题
This commit is contained in:
1 parent
889346a9ec
commit
ef23daf3b1
1 file changed
+1
-1
@@ -115,7 +115,7 @@ function resolvePath(routePath: string) {
|
|||||||
// 监听路由变化,确保左侧菜单能随TagsView切换而正确激活
|
// 监听路由变化,确保左侧菜单能随TagsView切换而正确激活
|
||||||
watch(
|
watch(
|
||||||
() => route.path,
|
() => route.path,
|
||||||
(newPath) => {
|
(newPath: string) => {
|
||||||
// 获取顶级路径
|
// 获取顶级路径
|
||||||
const topMenuPath =
|
const topMenuPath =
|
||||||
newPath.split("/").filter(Boolean).length > 1 ? newPath.match(/^\/[^/]+/)?.[0] || "/" : "/";
|
newPath.split("/").filter(Boolean).length > 1 ? newPath.match(/^\/[^/]+/)?.[0] || "/" : "/";
|
||||||
|
|||||||
Reference in new issue
Block a user