提交 45f85902 作者: 方治民

style: 预览组件图片背景色支持配置,默认值:#F7F7F7

上级 e582acec
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
type: String, type: String,
default: 'aspectFit', default: 'aspectFit',
}, },
background: {
type: String,
default: '#F7F7f7',
},
assets: { assets: {
type: Array as PropType<Recordable & URLs>, type: Array as PropType<Recordable & URLs>,
}, },
...@@ -49,7 +53,8 @@ ...@@ -49,7 +53,8 @@
const videoFullScreenChange = (e: any) => { const videoFullScreenChange = (e: any) => {
// 非全屏状态下停止播放 // 非全屏状态下停止播放
if (!e.detail.fullScreen) { if (!e.detail.fullScreen) {
videoContext.value?.stop() videoContext.value.seek(0)
videoContext.value.pause()
} }
} }
...@@ -64,6 +69,7 @@ ...@@ -64,6 +69,7 @@
<!-- 视频预览 --> <!-- 视频预览 -->
<fui-lazyload <fui-lazyload
class="preview-video" class="preview-video"
:background="props.background"
:mode="props.mode" :mode="props.mode"
v-for="(item, index) in videos" v-for="(item, index) in videos"
:key="item.url" :key="item.url"
...@@ -81,6 +87,7 @@ ...@@ -81,6 +87,7 @@
<!-- 图片预览 --> <!-- 图片预览 -->
<fui-lazyload <fui-lazyload
class="preview-image" class="preview-image"
:background="props.background"
:mode="props.mode" :mode="props.mode"
v-for="(item, index) in images" v-for="(item, index) in images"
:key="item.url" :key="item.url"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论