|
@@ -87,7 +87,7 @@
|
|
|
:style="
|
|
|
item.style || { top: item.y + 'px', left: item.x + 'px' }
|
|
|
"
|
|
|
- @click="curImgIndex = index + 1"
|
|
|
+ @click="handlePoint(index + 1)"
|
|
|
>
|
|
|
<span>{{ item.name }}</span>
|
|
|
</div>
|
|
@@ -111,7 +111,7 @@
|
|
|
>
|
|
|
<div
|
|
|
:class="{ active: index === curImgIndex }"
|
|
|
- @click="curImgIndex = index"
|
|
|
+ @click="handlePoint(index)"
|
|
|
>
|
|
|
<ElImage :src="imgItem.url" fit="cover" />
|
|
|
</div>
|
|
@@ -126,11 +126,11 @@
|
|
|
class="exhibition-cover-img__close"
|
|
|
@click="curImgIndex = 0"
|
|
|
/>
|
|
|
- <video
|
|
|
+ <Vue3VideoPlay
|
|
|
v-if="imgList[curImgIndex]?._data?.type === 'video'"
|
|
|
- controls
|
|
|
- disablePictureInPicture
|
|
|
- controlsList="nodownload nofullscreen noplaybackrate"
|
|
|
+ control
|
|
|
+ :volume="0.6"
|
|
|
+ :controlBtns="['audioTrack', 'volume', 'speedRate']"
|
|
|
:poster="imgList[curImgIndex]?.url"
|
|
|
:src="imgList[curImgIndex]?._data?.url"
|
|
|
/>
|
|
@@ -227,7 +227,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, computed, watch } from "vue";
|
|
|
+import { ref, computed, watch, nextTick } from "vue";
|
|
|
import { data } from "@syjy/base";
|
|
|
import { flattenData } from "@syjy/base/utils";
|
|
|
import { ElScrollbar, ElTooltip } from "element-plus";
|
|
@@ -235,6 +235,8 @@ import { useRoute } from "vue-router";
|
|
|
import { SCENE_URL } from "@syjy/base/utils";
|
|
|
// import VideoPopup from "@/components/VideoPopup/index.vue";
|
|
|
import VideoCover from "@/components/VideoCover/index.vue";
|
|
|
+import "vue3-video-play/dist/style.css";
|
|
|
+import Vue3VideoPlay from "vue3-video-play";
|
|
|
|
|
|
const route = useRoute();
|
|
|
const showVideo = ref(false);
|
|
@@ -328,17 +330,9 @@ const goToTargetScene = () => {
|
|
|
location.href = SCENE_URL + "&" + point.value.query;
|
|
|
};
|
|
|
|
|
|
-// const handlePoint = (item) => {
|
|
|
-// switch (item.type) {
|
|
|
-// case "video":
|
|
|
-// checkedPoint.value = item;
|
|
|
-// videoVisible.value = true;
|
|
|
-// break;
|
|
|
-// case "index":
|
|
|
-// curImgIndex.value = Number(item.target);
|
|
|
-// break;
|
|
|
-// }
|
|
|
-// };
|
|
|
+const handlePoint = (index) => {
|
|
|
+ curImgIndex.value = index;
|
|
|
+};
|
|
|
|
|
|
watch(
|
|
|
route,
|
|
@@ -560,16 +554,16 @@ watch(
|
|
|
font-size: 16px;
|
|
|
color: #614c3e;
|
|
|
}
|
|
|
- video,
|
|
|
+ #refPlayerWrap,
|
|
|
.el-image {
|
|
|
+ position: relative;
|
|
|
flex: 1;
|
|
|
width: 0;
|
|
|
height: 100%;
|
|
|
}
|
|
|
video {
|
|
|
- &::-webkit-media-controls-fullscreen-button {
|
|
|
- display: none;
|
|
|
- }
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
&__close {
|
|
|
position: absolute;
|