chore(components): diy组件部分添加点击事件句柄重新处理
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user