提交 086c86f5 编写于 作者: DCloud_JSON's avatar DCloud_JSON

fix: 修复swiper-vertical-video示例,在web 端由于浏览器限制,不能自动播放,引起的播放状态显示错误的问题

上级 cb435b83
......@@ -40,7 +40,7 @@
visibleList: [] as ListItem[],// 提高性能 可见的只有3个
current: 0 as number,
index: 0,
state: ["unPlay", "unPlay", "unPlay"] as string[]
state: ["pause", "unPlay", "unPlay"] as string[]
}
},
created() {
......@@ -86,9 +86,9 @@
}
},
onReady() {
// 一启动完成,就播放第一个
this.doPlay(0);
// #ifdef APP || MP
// 非web端,一启动完成,就播放第一个。因为 web端浏览器限制不支持自动播放
this.doPlay(0);
//App端适配不同状态栏高度
let backElement = this.$refs['back'] as UniElement;
backElement.style.setProperty('top', uni.getSystemInfoSync().statusBarHeight+'px');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册