mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 14:53:26 +08:00
uniapp【修复】:修复首页视频设置自动播放没有播放
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -11,14 +11,6 @@
|
||||
}>(), {
|
||||
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>
|
||||
<style lang="scss" scoped>
|
||||
.video-box {
|
||||
|
||||
Reference in New Issue
Block a user