提交 efb0b5ae 编写于 作者: Q qiang

fix: v3-video hidden

上级 e381c23f
......@@ -222,10 +222,13 @@ export default {
},
_updateStyle () {
const rect = this.$refs.container.getBoundingClientRect()
this.hidden = getComputedStyle(this.$el).display === 'none';
this.hidden = false;
['top', 'left', 'width', 'height'].forEach(key => {
let val = rect[key]
val = key === 'top' ? val + (document.documentElement.scrollTop || document.body.scrollTop || 0) : val
if (!val && (key === 'width' || key === 'height')) {
this.hidden = true
}
this.style[key] = val + 'px'
})
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册