e 1 year ago
parent
commit
18088c0f52
1 changed files with 3 additions and 1 deletions
  1. 3 1
      vue3/my-Router/src/pages/List.vue

+ 3 - 1
vue3/my-Router/src/pages/List.vue

@@ -8,7 +8,9 @@
                 :to="`/list/detail/${item.id}/${item.name}/${item.user}/${item.password}`"
             >{{ item.name }}</RouterLink> -->
             <!-- 第二种:params传参对象写法 只能使用name不能使用path -->
-            <RouterLink :to="{
+            <RouterLink 
+                active-class="active"
+            :to="{
                 name:'details',
                 params:{
                     id:item.id,