fix(custom-elements): custom element should re-instantiate when inserted again (#6966)

fix #6934
This commit is contained in:
ysy945 2022-11-11 17:06:21 +08:00 committed by GitHub
parent ffef822869
commit 67890daad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -196,7 +196,11 @@ export class VueElement extends BaseClass {
connectedCallback() {
this._connected = true
if (!this._instance) {
this._resolveDef()
if (this._resolved) {
this._update()
} else {
this._resolveDef()
}
}
}
@ -214,9 +218,6 @@ export class VueElement extends BaseClass {
* resolve inner component definition (handle possible async component)
*/
private _resolveDef() {
if (this._resolved) {
return
}
this._resolved = true
// set initial attrs