fix: 🐛 修复 ts 类型警告问题
This commit is contained in:
@@ -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