Parcourir la source

修复页面报错

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

+ 1 - 15
src/views/home/children/test/index.vue

@@ -23,12 +23,7 @@
           <span>{{ carTypeItem.name }}</span>
         </div>
       </template>
-      <van-tabs
-        class="test-type"
-        animated
-        ref="sujectRef"
-        @click="sujectChange"
-      >
+      <van-tabs class="test-type" animated>
         <van-tab
           :title="sujectItem.name"
           v-for="(sujectItem, index) in carTypeItem.sujectList"
@@ -55,20 +50,11 @@ const store = useStore();
 const carTypeRef = ref<any>(null);
 nextTick(() => {
   carTypeRef.value.scrollTo(store.state.carType);
-  nextTick(() => {
-    sujectRef.value.scrollTo(store.state.suject);
-  });
 });
 const carTypeChange = (e: string) => {
   store.commit("setCatType", e);
 };
 
-const sujectRef = ref<any>(null);
-
-const sujectChange = (e: string) => {
-  store.commit("setSuject", e);
-};
-
 const carTypeList = ref([
   {
     name: "轿车",