fix: 🐛 修复 ts 类型警告问题

This commit is contained in:
Ray.Hao
2025-09-17 15:38:36 +08:00
parent 889346a9ec
commit ef23daf3b1

View File

@@ -115,7 +115,7 @@ function resolvePath(routePath: string) {
// 监听路由变化确保左侧菜单能随TagsView切换而正确激活
watch(
() => route.path,
(newPath) => {
(newPath: string) => {
// 获取顶级路径
const topMenuPath =
newPath.split("/").filter(Boolean).length > 1 ? newPath.match(/^\/[^/]+/)?.[0] || "/" : "/";