mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:13:26 +08:00
uniapp【修复】:修复首页视频设置自动播放没有播放
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="video-box m-b-25" v-for="item,index in props.data.list" :key="index">
|
<view class="video-box m-b-25" v-for="item,index in props.data.list" :key="index">
|
||||||
<video class="video" :src="item.url" :autoplay="autoplay" :poster="item.image"></video>
|
<video class="video" :src="item.url" :autoplay="props.data.autoplay == true || props.data.autoplay == 'true'" :poster="item.image"></video>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -11,14 +11,6 @@
|
|||||||
}>(), {
|
}>(), {
|
||||||
data: {},
|
data: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
let autoplay = ref(false);
|
|
||||||
|
|
||||||
watch(() => props.data.autoplay, (autoplay) => {
|
|
||||||
if (props.data.autoplay == true || props.data.autoplay == 'true') {
|
|
||||||
autoplay.value = true;
|
|
||||||
}
|
|
||||||
}, { immediate: true });
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.video-box {
|
.video-box {
|
||||||
|
|||||||
Reference in New Issue
Block a user