소스 검색

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

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

zhangningning 3 주 전
부모
커밋
12b43918d2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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'
   }