diff --git a/src/layer/index.js b/src/layer/index.js index e8ee8f1..08d2d8e 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -377,8 +377,10 @@ class Layer extends Component { this.#play() } - updated() { - this.#play() + updated(props, force) { + if (force) { + this.#play() + } } moveTo(obj = {}) { @@ -524,7 +526,7 @@ function layer(opt = {}) { tmp.innerHTML = content layDom.appendChild(tmp.content.cloneNode(true)) - layDom.updated() + layDom.updated(null, true) } else { layDom.innerHTML = content document.body.appendChild(layDom)