@vue/runtime-dom 3.6.0-beta.14 → 3.6.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-dom.cjs.js +2 -2
- package/dist/runtime-dom.cjs.prod.js +2 -2
- package/dist/runtime-dom.esm-browser.js +26 -11
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +2 -2
- package/dist/runtime-dom.global.js +26 -11
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2158,8 +2158,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2158
2158
|
if (once && cb) {
|
|
2159
2159
|
const _cb = cb;
|
|
2160
2160
|
cb = (...args) => {
|
|
2161
|
-
_cb(...args);
|
|
2161
|
+
const res = _cb(...args);
|
|
2162
2162
|
this.stop();
|
|
2163
|
+
return res;
|
|
2163
2164
|
};
|
|
2164
2165
|
}
|
|
2165
2166
|
this.cb = cb;
|
|
@@ -2173,7 +2174,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2173
2174
|
if (!this.cb) return;
|
|
2174
2175
|
const { immediate, deep, call } = this.options;
|
|
2175
2176
|
if (initialRun && !immediate) return;
|
|
2176
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2177
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2177
2178
|
cleanup(this);
|
|
2178
2179
|
const currentWatcher = activeWatcher;
|
|
2179
2180
|
activeWatcher = this;
|
|
@@ -4225,11 +4226,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4225
4226
|
onError(err);
|
|
4226
4227
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4227
4228
|
});
|
|
4228
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4229
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4229
4230
|
load().then(() => {
|
|
4231
|
+
if (instance.isUnmounted) return;
|
|
4230
4232
|
loaded.value = true;
|
|
4231
4233
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4232
4234
|
}).catch((err) => {
|
|
4235
|
+
if (instance.isUnmounted) {
|
|
4236
|
+
setPendingRequest(null);
|
|
4237
|
+
return;
|
|
4238
|
+
}
|
|
4233
4239
|
onError(err);
|
|
4234
4240
|
error.value = err;
|
|
4235
4241
|
});
|
|
@@ -4287,14 +4293,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4287
4293
|
setPendingRequest: (request) => pendingRequest = request
|
|
4288
4294
|
};
|
|
4289
4295
|
}
|
|
4290
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4296
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4291
4297
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4292
4298
|
const error = /* @__PURE__ */ ref();
|
|
4293
4299
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4294
|
-
|
|
4300
|
+
let timeoutTimer;
|
|
4301
|
+
let delayTimer;
|
|
4302
|
+
if (instance) onUnmounted(() => {
|
|
4303
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4304
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4305
|
+
}, instance);
|
|
4306
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4307
|
+
if (instance && instance.isUnmounted) return;
|
|
4295
4308
|
delayed.value = false;
|
|
4296
4309
|
}, delay);
|
|
4297
|
-
if (timeout != null) setTimeout(() => {
|
|
4310
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4311
|
+
if (instance && instance.isUnmounted) return;
|
|
4298
4312
|
if (!loaded.value && !error.value) {
|
|
4299
4313
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4300
4314
|
onError(err);
|
|
@@ -5551,12 +5565,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5551
5565
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
5552
5566
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
5553
5567
|
}
|
|
5554
|
-
|
|
5568
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
5569
|
+
if (!hasVModel) {
|
|
5555
5570
|
localValue = value;
|
|
5556
5571
|
trigger();
|
|
5557
5572
|
}
|
|
5558
5573
|
i.emit(`update:${name}`, emittedValue);
|
|
5559
|
-
if (hasChanged(value,
|
|
5574
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
5560
5575
|
prevSetValue = value;
|
|
5561
5576
|
prevEmittedValue = emittedValue;
|
|
5562
5577
|
}
|
|
@@ -8402,7 +8417,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8402
8417
|
}
|
|
8403
8418
|
//#endregion
|
|
8404
8419
|
//#region packages/runtime-core/src/index.ts
|
|
8405
|
-
const version = "3.6.0-beta.
|
|
8420
|
+
const version = "3.6.0-beta.15";
|
|
8406
8421
|
const warn = warn$1;
|
|
8407
8422
|
/**
|
|
8408
8423
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9537,7 +9552,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9537
9552
|
prevChildren = [];
|
|
9538
9553
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
9539
9554
|
const child = children[i];
|
|
9540
|
-
if (child.el && child.el instanceof Element) {
|
|
9555
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
9541
9556
|
prevChildren.push(child);
|
|
9542
9557
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9543
9558
|
positionMap.set(child, getPosition(child.el));
|