4/5/1404
This commit is contained in:
+15
-21
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @vue/runtime-dom v3.5.18
|
||||
* @vue/runtime-dom v3.5.14
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
@@ -786,10 +786,13 @@ class VueElement extends BaseClass {
|
||||
this._root = this;
|
||||
}
|
||||
}
|
||||
if (!this._def.__asyncLoader) {
|
||||
this._resolveProps(this._def);
|
||||
}
|
||||
}
|
||||
connectedCallback() {
|
||||
if (!this.isConnected) return;
|
||||
if (!this.shadowRoot && !this._resolved) {
|
||||
if (!this.shadowRoot) {
|
||||
this._parseSlots();
|
||||
}
|
||||
this._connected = true;
|
||||
@@ -802,7 +805,8 @@ class VueElement extends BaseClass {
|
||||
}
|
||||
if (!this._instance) {
|
||||
if (this._resolved) {
|
||||
this._mount(this._def);
|
||||
this._setParent();
|
||||
this._update();
|
||||
} else {
|
||||
if (parent && parent._pendingResolve) {
|
||||
this._pendingResolve = parent._pendingResolve.then(() => {
|
||||
@@ -818,15 +822,7 @@ class VueElement extends BaseClass {
|
||||
_setParent(parent = this._parent) {
|
||||
if (parent) {
|
||||
this._instance.parent = parent._instance;
|
||||
this._inheritParentContext(parent);
|
||||
}
|
||||
}
|
||||
_inheritParentContext(parent = this._parent) {
|
||||
if (parent && this._app) {
|
||||
Object.setPrototypeOf(
|
||||
this._app._context.provides,
|
||||
parent._instance.provides
|
||||
);
|
||||
this._instance.provides = parent._instance.provides;
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
@@ -876,7 +872,9 @@ class VueElement extends BaseClass {
|
||||
}
|
||||
}
|
||||
this._numberProps = numberProps;
|
||||
this._resolveProps(def);
|
||||
if (isAsync) {
|
||||
this._resolveProps(def);
|
||||
}
|
||||
if (this.shadowRoot) {
|
||||
this._applyStyles(styles);
|
||||
}
|
||||
@@ -884,17 +882,15 @@ class VueElement extends BaseClass {
|
||||
};
|
||||
const asyncDef = this._def.__asyncLoader;
|
||||
if (asyncDef) {
|
||||
this._pendingResolve = asyncDef().then((def) => {
|
||||
def.configureApp = this._def.configureApp;
|
||||
resolve(this._def = def, true);
|
||||
});
|
||||
this._pendingResolve = asyncDef().then(
|
||||
(def) => resolve(this._def = def, true)
|
||||
);
|
||||
} else {
|
||||
resolve(this._def);
|
||||
}
|
||||
}
|
||||
_mount(def) {
|
||||
this._app = this._createApp(def);
|
||||
this._inheritParentContext();
|
||||
if (def.configureApp) {
|
||||
def.configureApp(this._app);
|
||||
}
|
||||
@@ -977,9 +973,7 @@ class VueElement extends BaseClass {
|
||||
}
|
||||
}
|
||||
_update() {
|
||||
const vnode = this._createVNode();
|
||||
if (this._app) vnode.appContext = this._app._context;
|
||||
render(vnode, this._root);
|
||||
render(this._createVNode(), this._root);
|
||||
}
|
||||
_createVNode() {
|
||||
const baseProps = {};
|
||||
|
||||
Reference in New Issue
Block a user