Signed-off-by: jefflaa <jeff_laa@163.com>
This commit is contained in:
jefflaa
2025-03-27 05:41:19 +00:00
committed by Gitee
parent f9a6d42aac
commit 5cdf1c4457
2 changed files with 26 additions and 2 deletions

View File

@@ -31,6 +31,22 @@ export const widgetVideo = {
placeholder: '',
value: 'https://www.w3school.com.cn//i/movie.ogg',
},
{
type: 'el-switch',
label: '循环播放',
name: 'isLoop',
required: false,
placeholder: '',
value: false,
},
{
type: 'el-switch',
label: '自动播放(静音)',
name: 'autoplay',
required: false,
placeholder: '',
value: false,
},
],
// 数据
data: [],

View File

@@ -1,5 +1,11 @@
<template>
<video :style="styleColor" :src="styleColor.videoAdress" controls="controls">
<video
:style="styleColor"
:src="styleColor.videoAdress"
controls="controls"
:loop="styleColor.loop"
:autoplay="styleColor.autoplay"
:muted="styleColor.autoplay">
您的浏览器不支持 video 标签
</video>
</template>
@@ -29,7 +35,9 @@ export default {
left: this.transStyle.left + "px",
top: this.transStyle.top + "px",
right: this.transStyle.right + "px",
videoAdress: this.transStyle.videoAdress
videoAdress: this.transStyle.videoAdress,
loop: this.transStyle.isLoop,
autoplay: this.transStyle.autoplay
};
}
},