丸子 5 месяцев назад
Родитель
Сommit
9aa3f68a04
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/views/programming/ProgrammingList.vue

+ 3 - 3
src/views/programming/ProgrammingList.vue

@@ -94,7 +94,7 @@ const goBackIndex = () => {
 const specificCourses = reactive([])
 const specificCourses = reactive([])
 
 
 // 当前激活的按钮索引
 // 当前激活的按钮索引
-const activeButton = ref(-1)
+const activeButton = ref(0)
 
 
 // 在获取到categoryId后再调用TopicList接口
 // 在获取到categoryId后再调用TopicList接口
 const fetchTopicList = () => {
 const fetchTopicList = () => {
@@ -117,8 +117,8 @@ const fetchTopicList = () => {
         specificCourses.forEach((_, index) => {
         specificCourses.forEach((_, index) => {
           circleButtons.push({ text: String(index + 1) });
           circleButtons.push({ text: String(index + 1) });
         });
         });
-        // 重置激活按钮索引,但不默认选中第一项
-        activeButton.value = -1;
+        // 重置激活按钮索引,默认选中第一项
+        activeButton.value = 0;
       }
       }
     })
     })
   }
   }