|
|
@@ -3,7 +3,7 @@
|
|
|
class="exhibition"
|
|
|
v-model:active="activeMenu"
|
|
|
:swipe-threshold="4"
|
|
|
- @before-change="beforeChange"
|
|
|
+ :before-change="beforeChange"
|
|
|
>
|
|
|
<van-tab v-for="(item, index) in data" :key="index" :title="item.title">
|
|
|
<template v-if="imgList.length">
|
|
|
@@ -83,8 +83,8 @@ import { useRoute } from "vue-router";
|
|
|
|
|
|
const route = useRoute();
|
|
|
const activeMenu = ref(0);
|
|
|
-const activeSecondMenu = ref(0);
|
|
|
-const activeThirdMenu = ref(0);
|
|
|
+const activeSecondMenu = ref(-1);
|
|
|
+const activeThirdMenu = ref(-1);
|
|
|
const curImgIndex = ref(0);
|
|
|
const videoVisible = ref(false);
|
|
|
const checkedItem = ref(null);
|
|
|
@@ -97,8 +97,10 @@ const curDetail = computed(() => {
|
|
|
const firstItem = data[activeMenu.value];
|
|
|
let temp = null;
|
|
|
|
|
|
- if (!firstItem.children) {
|
|
|
+ if (!firstItem.children || activeSecondMenu.value < 0) {
|
|
|
temp = firstItem;
|
|
|
+ } else if (activeThirdMenu.value < 0) {
|
|
|
+ temp = firstItem.children[activeSecondMenu.value];
|
|
|
} else {
|
|
|
temp =
|
|
|
firstItem.children[activeSecondMenu.value].children[
|
|
|
@@ -147,16 +149,17 @@ const goToScene = () => {
|
|
|
|
|
|
const beforeChange = () => {
|
|
|
curImgIndex.value = 0;
|
|
|
- activeSecondMenu.value = 0;
|
|
|
- activeThirdMenu.value = 0;
|
|
|
+ activeSecondMenu.value = -1;
|
|
|
+ activeThirdMenu.value = -1;
|
|
|
+ return true;
|
|
|
};
|
|
|
|
|
|
const handleSelect = (item) => {
|
|
|
const res = item.value.split(",").map((i) => Number(i));
|
|
|
curImgIndex.value = 0;
|
|
|
activeMenu.value = res[0];
|
|
|
- activeSecondMenu.value = res[1] ?? 0;
|
|
|
- activeThirdMenu.value = res[2] ?? 0;
|
|
|
+ activeSecondMenu.value = res[1] ?? -1;
|
|
|
+ activeThirdMenu.value = res[2] ?? -1;
|
|
|
};
|
|
|
|
|
|
const handlePreview = () => {
|