|
@@ -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([
|
|
|
{
|