Commit f54731a0fe896a13c8096e44bfbe22b1544407e5

Authored by ww
1 parent 7f3e4715

fix: close modal cancel video buffer

... ... @@ -23,7 +23,7 @@
23 23 </div>
24 24 </template>
25 25 <script setup lang="ts">
26   - import { ref, nextTick, reactive, unref } from 'vue';
  26 + import { ref, nextTick, reactive } from 'vue';
27 27 import { BasicModal, useModalInner } from '/@/components/Modal';
28 28 import type { StreamingManageRecord, CameraModel } from '/@/api/camera/model/cameraModel';
29 29 import { videoPlay } from 'vue3-video-play'; // 引入组件
... ... @@ -68,6 +68,7 @@
68 68
69 69 const [register] = useModalInner(
70 70 async (data: { record: CameraModel | StreamingManageRecord }) => {
  71 + // setModalProps({ destroyOnClose: true });
71 72 const { record } = data;
72 73 if (record.accessMode === AccessMode.ManuallyEnter) {
73 74 if ((record as CameraModel).videoUrl) {
... ... @@ -85,8 +86,8 @@
85 86 }
86 87 );
87 88 const handleCancel = () => {
88   - console.log(unref(video));
89 89 //关闭暂停播放视频
  90 + options.src = '';
90 91 video.value.pause();
91 92 };
92 93 </script>
... ...