wyling il y a 3 ans
Parent
commit
2366c25d43
1 fichiers modifiés avec 13 ajouts et 19 suppressions
  1. 13 19
      src/views/home/children/test/index.vue

+ 13 - 19
src/views/home/children/test/index.vue

@@ -4,13 +4,7 @@
   <!-- 轮播图 -->
   <!-- <swiper /> -->
   <!-- 用户做题预选界面 -->
-  <van-tabs
-    class="car-type"
-    line-width="0"
-    animated
-    ref="carTypeRef"
-    @click="carTypeChange"
-  >
+  <van-tabs class="car-type" line-width="0" animated>
     <van-tab
       v-for="(carTypeItem, index) in carTypeList"
       :key="index"
@@ -45,20 +39,20 @@ import sujectOne from "./components/sujectOne.vue";
 import userData from "./components/userData.vue";
 import { ref, nextTick, onBeforeMount } from "vue";
 import { useStore } from "vuex";
-const store = useStore();
+// const store = useStore();
 
-const carTypeRef = ref<any>(null);
-onBeforeMount(() => {
-  nextTick(() => {
-    try {
-      carTypeRef.value.scrollTo(store.state.carType);
-    } catch (error) {}
-  });
-});
+// const carTypeRef = ref<any>(null);
+// onBeforeMount(() => {
+//   nextTick(() => {
+//     try {
+//       carTypeRef.value.scrollTo(store.state.carType);
+//     } catch (error) {}
+//   });
+// });
 
-const carTypeChange = (e: string) => {
-  store.commit("setCatType", e);
-};
+// const carTypeChange = (e: string) => {
+//   store.commit("setCatType", e);
+// };
 
 const carTypeList = ref([
   {