优化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,9 +377,11 @@ class Layer extends Component {
this.#play()
}
updated() {
updated(props, force) {
if (force) {
this.#play()
}
}
moveTo(obj = {}) {
var css = ''
@ -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)