Browse Source

```
fix(App): 修复首页路由判断逻辑

当路由路径为 '/index' 时,将 activeIndex 设置为 '1',
修正了之前只判断 '/' 路径导致的导航激活状态不正确的问题
```

zhangningning 3 weeks ago
parent
commit
12b43918d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/App.vue

+ 1 - 1
src/App.vue

@@ -126,7 +126,7 @@ const goLearnNote = () => {
 // 将 activeIndex 改为响应式,并根据当前路由动态计算
 const activeIndex = computed(() => {
   console.log('route.path',route.path)
-  if (route.path === '/') return '1'
+  if (route.path === '/index') return '1'
   if (route.path.startsWith('/workflow-trade')) {
     return '2'
   }