Commit c864c486 by 前端

Merge branch 'bugfix_SAAS+V4.54.1' into 'SAAS+V4.55.0-0730'

上线合并

See merge request !464
2 parents 1f10a138 6e46cb65
...@@ -13,9 +13,13 @@ ...@@ -13,9 +13,13 @@
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'" v-if="picOptions.type == 'video'"
> >
<video id="video" width="100%" height="100%" preload loop muted> <video id="video" width="100%" height="100%" preload="none" loop muted>
<source :src="item" type="video/mp4" /> <source :src="item" type="video/mp4" />
</video> </video>
<img
class="video-poster"
src="../../../../assets/video-default.png"
/>
<div class="mask"> <div class="mask">
<div <div
class="pic-pane-close" class="pic-pane-close"
...@@ -199,6 +203,20 @@ export default { ...@@ -199,6 +203,20 @@ export default {
default: -1 default: -1
} }
}, },
watch: {
dialogVisibleImg(val) {
if (!val) {
// 关闭所有视频播放
const videos = document.querySelectorAll('.preVideo');
videos.forEach(video => {
if (video && !video.paused) {
video.pause();
video.currentTime = 0;
}
});
}
}
},
data() { data() {
return { return {
uploading: false, uploading: false,
...@@ -471,6 +489,16 @@ export default { ...@@ -471,6 +489,16 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-poster {
position: absolute;
width: 104px;
height: 104px;
object-fit: fill;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.mask { .mask {
display: flex; display: flex;
align-items: center; align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!