提交 6e58ed02 编写于 作者: Q qiang

fix: 解决 app-v3 video 组件部分情况在 iOS 上无法显示的问题

上级 0bafe1b7
...@@ -168,7 +168,14 @@ export default { ...@@ -168,7 +168,14 @@ export default {
this.video && this.video.setStyles(this.position) this.video && this.video.setStyles(this.position)
}, { deep: true }) }, { deep: true })
this.$watch('hidden', (val) => { this.$watch('hidden', (val) => {
this.video && this.video[val ? 'hide' : 'show']() const video = this.video
if (video) {
video[val ? 'hide' : 'show']()
// iOS 隐藏状态设置 setStyles 不生效
if (!val) {
video.setStyles(this.position)
}
}
}) })
events.forEach(key => { events.forEach(key => {
video.addEventListener(key, (data = {}) => { video.addEventListener(key, (data = {}) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册