增加keepalive支持

dev
yutent 2023-08-11 19:08:31 +08:00
parent 5748e6a760
commit 6f3ea0f086
1 changed files with 5 additions and 0 deletions

View File

@ -344,6 +344,9 @@ export class Component extends HTMLElement {
if (this.$animate?.immediate) {
this.$animate()
}
if (this.__keep_alive__) {
this.activated()
}
this.mounted()
} else {
this.updated(props)
@ -366,6 +369,8 @@ export class Component extends HTMLElement {
// 几个生命周期回调
created() {}
mounted() {}
activated() {}
deactivated() {}
unmounted() {}
updated() {}
render() {