优化layer动画触发

master
yutent 2023-09-04 15:54:46 +08:00
parent e8474c869b
commit eb3d26ea4a
1 changed files with 5 additions and 3 deletions

View File

@ -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)