提交 6ed85da1 编写于 作者: shutao-dc's avatar shutao-dc

update resize-observer.uvue

上级 dd91efd6
......@@ -31,7 +31,7 @@
outBoxSizeInfo: "",
innerBoxSizeInfo: "",
offset: 2,
boxDisplay: true,
boxDisplay: false,
outBoxElement: null as UniElement | null,
innerBoxElement: null as UniElement | null,
resizeObserver: null as UniResizeObserver | null
......@@ -43,7 +43,7 @@
}
return false
},
onShow() {
onReady() {
if (this.resizeObserver == null) {
this.resizeObserver = new UniResizeObserver((entries : Array<UniResizeObserverEntry>) => {
entries.forEach(entry => {
......@@ -62,6 +62,7 @@
if (this.innerBoxElement != null) {
this.resizeObserver!.observe(this.innerBoxElement!)
}
this.boxDisplay = true
}
},
methods: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册