chore(components): diy组件部分添加点击事件句柄重新处理

This commit is contained in:
2025-10-30 18:09:57 +08:00
parent fc232ad938
commit 55ebc174b9
15 changed files with 180 additions and 70 deletions

View File

@@ -1,9 +1,10 @@
<template>
<video data-component-name="diy-video" class="diy-video" :src="$util.img(value.videoUrl)" :poster="$util.img(value.imageUrl)" :style="videoWarpCss" objectFit="cover"></video>
<video data-component-name="diy-video" class="diy-video" :src="$util.img(value.videoUrl)" :poster="$util.img(value.imageUrl)" :style="videoWarpCss" objectFit="cover" @click="handlerClick(value.videoUrl)" @tap="handlerClick(value.videoUrl)"></video>
</template>
<script>
// 视频
import DiyMinx from './minx.js'
export default {
name: 'diy-video',
props: {
@@ -15,6 +16,7 @@
return {};
},
created() {},
mixins: [DiyMinx],
watch: {
// 组件刷新监听
componentRefresh: function(nval) {}
@@ -31,7 +33,13 @@
return obj;
}
},
methods: {}
methods: {
async handlerClick(videoUrl) {
await this.__$emitEvent({eventName: 'video-tap', data: videoUrl, promiseCallback: (event, handler, awaitedResult) => {
if (!awaitedResult) return;
}})
}
}
};
</script>