@vue/compat 3.5.44 → 3.5.45
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/README.md +2 -2
- package/dist/vue.cjs.js +322 -127
- package/dist/vue.cjs.prod.js +300 -123
- package/dist/vue.esm-browser.js +315 -120
- package/dist/vue.esm-browser.prod.js +10 -10
- package/dist/vue.esm-bundler.js +316 -121
- package/dist/vue.global.js +315 -120
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +310 -119
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +311 -120
- package/dist/vue.runtime.global.js +310 -119
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +3 -3
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.45
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,24 +61,20 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-\w/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
);
|
|
64
|
+
const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
65
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
66
|
+
});
|
|
69
67
|
const hyphenateRE = /\B([A-Z])/g;
|
|
70
|
-
const hyphenate = cacheStringFunction(
|
|
68
|
+
const hyphenate = /* @__PURE__ */ cacheStringFunction(
|
|
71
69
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
72
70
|
);
|
|
73
|
-
const capitalize = cacheStringFunction((str) => {
|
|
71
|
+
const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
74
72
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
75
73
|
});
|
|
76
|
-
const toHandlerKey = cacheStringFunction(
|
|
77
|
-
(str)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
);
|
|
74
|
+
const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
75
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
76
|
+
return s;
|
|
77
|
+
});
|
|
82
78
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
83
79
|
const invokeArrayFns = (fns, ...arg) => {
|
|
84
80
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -264,7 +260,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
264
260
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
265
261
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
266
262
|
|
|
267
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
263
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
268
264
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
269
265
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
270
266
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -608,7 +604,11 @@ function getCurrentScope() {
|
|
|
608
604
|
}
|
|
609
605
|
function onScopeDispose(fn, failSilently = false) {
|
|
610
606
|
if (activeEffectScope) {
|
|
611
|
-
activeEffectScope.
|
|
607
|
+
if (activeEffectScope.active) {
|
|
608
|
+
activeEffectScope.cleanups.push(fn);
|
|
609
|
+
} else {
|
|
610
|
+
fn();
|
|
611
|
+
}
|
|
612
612
|
} else if (!failSilently) {
|
|
613
613
|
warn$2(
|
|
614
614
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
@@ -1415,7 +1415,7 @@ function noTracking(self, method, args = []) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
|
|
1417
1417
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1418
|
-
const builtInSymbols = new Set(
|
|
1418
|
+
const builtInSymbols = /* @__PURE__ */ new Set(
|
|
1419
1419
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1420
1420
|
);
|
|
1421
1421
|
function hasOwnProperty(key) {
|
|
@@ -2625,7 +2625,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2625
2625
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2626
2626
|
if (res && isPromise(res)) {
|
|
2627
2627
|
res.catch((err) => {
|
|
2628
|
-
handleError(err, instance, type);
|
|
2628
|
+
handleError(err, instance, type, void 0, true);
|
|
2629
2629
|
});
|
|
2630
2630
|
}
|
|
2631
2631
|
return res;
|
|
@@ -2642,7 +2642,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2642
2642
|
);
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2645
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2646
2646
|
const contextVNode = instance ? instance.vnode : null;
|
|
2647
2647
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2648
2648
|
if (instance) {
|
|
@@ -2651,7 +2651,9 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2651
2651
|
const errorInfo = ErrorTypeStrings$1[type] ;
|
|
2652
2652
|
while (cur) {
|
|
2653
2653
|
const errorCapturedHooks = cur.ec;
|
|
2654
|
-
if (errorCapturedHooks
|
|
2654
|
+
if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
|
|
2655
|
+
// are deferred or discarded by Suspense.
|
|
2656
|
+
(!isAsyncError || cur.scope.active)) {
|
|
2655
2657
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
2656
2658
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
2657
2659
|
return;
|
|
@@ -2979,14 +2981,32 @@ function reload(id, newComp) {
|
|
|
2979
2981
|
instance.ceReload(newComp.styles);
|
|
2980
2982
|
dirtyInstances.delete(instance);
|
|
2981
2983
|
} else if (instance.parent) {
|
|
2982
|
-
|
|
2983
|
-
if (!
|
|
2984
|
-
|
|
2984
|
+
const update = () => {
|
|
2985
|
+
if (!instance.scope.active) return;
|
|
2986
|
+
const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
|
|
2987
|
+
if (pending) {
|
|
2988
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
2989
|
+
if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
|
|
2990
|
+
queueJob(update);
|
|
2991
|
+
}
|
|
2992
|
+
});
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2996
|
+
if (!dirtyInstances) {
|
|
2997
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2998
|
+
}
|
|
2999
|
+
dirtyInstances.add(instance);
|
|
3000
|
+
isHmrUpdating = true;
|
|
3001
|
+
try {
|
|
2985
3002
|
instance.parent.update();
|
|
3003
|
+
} finally {
|
|
2986
3004
|
isHmrUpdating = false;
|
|
2987
3005
|
dirtyInstances.delete(instance);
|
|
3006
|
+
queuePostFlushCb(() => hmrDirtyComponents.clear());
|
|
2988
3007
|
}
|
|
2989
|
-
}
|
|
3008
|
+
};
|
|
3009
|
+
queueJob(update);
|
|
2990
3010
|
} else if (instance.appContext.reload) {
|
|
2991
3011
|
instance.appContext.reload();
|
|
2992
3012
|
} else if (typeof window !== "undefined") {
|
|
@@ -3668,12 +3688,31 @@ function withDirectives(vnode, directives) {
|
|
|
3668
3688
|
return vnode;
|
|
3669
3689
|
}
|
|
3670
3690
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3671
|
-
|
|
3691
|
+
let hookVNode = vnode;
|
|
3692
|
+
if (name === "beforeMount") {
|
|
3693
|
+
vnode._mount = vnode;
|
|
3694
|
+
} else if (name === "beforeUpdate") {
|
|
3695
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3696
|
+
if (mount) {
|
|
3697
|
+
mount._latest = vnode;
|
|
3698
|
+
vnode._mount = mount;
|
|
3699
|
+
}
|
|
3700
|
+
} else if (name === "mounted") {
|
|
3701
|
+
const latest = vnode._latest;
|
|
3702
|
+
vnode._mount = vnode._latest = void 0;
|
|
3703
|
+
if (latest) {
|
|
3704
|
+
hookVNode = latest;
|
|
3705
|
+
latest._mount = void 0;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
const bindings = hookVNode.dirs;
|
|
3672
3709
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3673
3710
|
for (let i = 0; i < bindings.length; i++) {
|
|
3674
|
-
|
|
3711
|
+
let binding = bindings[i];
|
|
3675
3712
|
if (oldBindings) {
|
|
3676
3713
|
binding.oldValue = oldBindings[i].value;
|
|
3714
|
+
} else if (name === "mounted" && binding.oldValue !== void 0) {
|
|
3715
|
+
binding = extend({}, binding, { oldValue: void 0 });
|
|
3677
3716
|
}
|
|
3678
3717
|
let hook = binding.dir[name];
|
|
3679
3718
|
if (!hook) {
|
|
@@ -3684,7 +3723,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3684
3723
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3685
3724
|
vnode.el,
|
|
3686
3725
|
binding,
|
|
3687
|
-
|
|
3726
|
+
hookVNode,
|
|
3688
3727
|
prevVNode
|
|
3689
3728
|
]);
|
|
3690
3729
|
resetTracking();
|
|
@@ -4308,13 +4347,11 @@ const BaseTransitionImpl = {
|
|
|
4308
4347
|
if (!innerChild) {
|
|
4309
4348
|
return emptyPlaceholder(child);
|
|
4310
4349
|
}
|
|
4311
|
-
|
|
4350
|
+
const enterHooks = resolveTransitionHooks(
|
|
4312
4351
|
innerChild,
|
|
4313
4352
|
rawProps,
|
|
4314
4353
|
state,
|
|
4315
|
-
instance
|
|
4316
|
-
// #11061, ensure enterHooks is fresh after clone
|
|
4317
|
-
(hooks) => enterHooks = hooks
|
|
4354
|
+
instance
|
|
4318
4355
|
);
|
|
4319
4356
|
if (innerChild.type !== Comment) {
|
|
4320
4357
|
setTransitionHooks(innerChild, enterHooks);
|
|
@@ -4333,7 +4370,17 @@ const BaseTransitionImpl = {
|
|
|
4333
4370
|
leavingHooks.afterLeave = () => {
|
|
4334
4371
|
state.isLeaving = false;
|
|
4335
4372
|
if (!(instance.job.flags & 8)) {
|
|
4336
|
-
instance.
|
|
4373
|
+
if (instance.effect.flags & 2) {
|
|
4374
|
+
const job = () => {
|
|
4375
|
+
if (!(instance.job.flags & 8)) {
|
|
4376
|
+
instance.update();
|
|
4377
|
+
}
|
|
4378
|
+
};
|
|
4379
|
+
job.i = instance;
|
|
4380
|
+
queueJob(job);
|
|
4381
|
+
} else {
|
|
4382
|
+
instance.update();
|
|
4383
|
+
}
|
|
4337
4384
|
}
|
|
4338
4385
|
delete leavingHooks.afterLeave;
|
|
4339
4386
|
oldInnerChild = void 0;
|
|
@@ -4400,7 +4447,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4400
4447
|
}
|
|
4401
4448
|
return leavingVNodesCache;
|
|
4402
4449
|
}
|
|
4403
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4450
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4404
4451
|
const {
|
|
4405
4452
|
appear,
|
|
4406
4453
|
mode,
|
|
@@ -4539,15 +4586,21 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4539
4586
|
}
|
|
4540
4587
|
},
|
|
4541
4588
|
clone(vnode2) {
|
|
4542
|
-
const
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4589
|
+
const cloned = resolveTransitionHooks(vnode2, props, state, instance);
|
|
4590
|
+
cloned.afterLeave = () => {
|
|
4591
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4592
|
+
};
|
|
4593
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4594
|
+
if (hooks.delayLeave) {
|
|
4595
|
+
hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4596
|
+
} else {
|
|
4597
|
+
delayedLeave();
|
|
4598
|
+
}
|
|
4599
|
+
};
|
|
4600
|
+
cloned.delayedLeave = () => {
|
|
4601
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4602
|
+
};
|
|
4603
|
+
return cloned;
|
|
4551
4604
|
}
|
|
4552
4605
|
};
|
|
4553
4606
|
return hooks;
|
|
@@ -4588,8 +4641,16 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4588
4641
|
hooks
|
|
4589
4642
|
);
|
|
4590
4643
|
} else if (vnode.shapeFlag & 128) {
|
|
4591
|
-
|
|
4592
|
-
|
|
4644
|
+
const suspense = vnode.suspense;
|
|
4645
|
+
if (suspense) {
|
|
4646
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4647
|
+
if (branch) {
|
|
4648
|
+
setTransitionHooks(branch, hooks.clone(branch));
|
|
4649
|
+
}
|
|
4650
|
+
} else {
|
|
4651
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4652
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4653
|
+
}
|
|
4593
4654
|
} else {
|
|
4594
4655
|
vnode.transition = hooks;
|
|
4595
4656
|
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
@@ -5290,7 +5351,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5290
5351
|
getContainerType(container),
|
|
5291
5352
|
slotScopeIds
|
|
5292
5353
|
);
|
|
5293
|
-
if (parentComponent) {
|
|
5354
|
+
if (parentComponent && parentComponent.vnode.el === node) {
|
|
5294
5355
|
parentComponent.vnode.el = vnode.el;
|
|
5295
5356
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
5296
5357
|
}
|
|
@@ -5724,7 +5785,8 @@ function defineAsyncComponent(source) {
|
|
|
5724
5785
|
err,
|
|
5725
5786
|
instance,
|
|
5726
5787
|
13,
|
|
5727
|
-
!errorComponent
|
|
5788
|
+
!errorComponent,
|
|
5789
|
+
true
|
|
5728
5790
|
);
|
|
5729
5791
|
};
|
|
5730
5792
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
@@ -5742,7 +5804,7 @@ function defineAsyncComponent(source) {
|
|
|
5742
5804
|
const delayed = ref(!!delay);
|
|
5743
5805
|
let timeoutTimer;
|
|
5744
5806
|
let delayTimer;
|
|
5745
|
-
|
|
5807
|
+
onScopeDispose(() => {
|
|
5746
5808
|
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5747
5809
|
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5748
5810
|
});
|
|
@@ -5870,6 +5932,12 @@ const KeepAliveImpl = {
|
|
|
5870
5932
|
}
|
|
5871
5933
|
};
|
|
5872
5934
|
sharedContext.deactivate = (vnode) => {
|
|
5935
|
+
const cached = cache.get(
|
|
5936
|
+
vnode.key == null ? vnode.type : vnode.key
|
|
5937
|
+
);
|
|
5938
|
+
if (!cached || cached.component !== vnode.component) {
|
|
5939
|
+
return false;
|
|
5940
|
+
}
|
|
5873
5941
|
const instance2 = vnode.component;
|
|
5874
5942
|
invalidateMount(instance2.m);
|
|
5875
5943
|
invalidateMount(instance2.a);
|
|
@@ -5890,6 +5958,7 @@ const KeepAliveImpl = {
|
|
|
5890
5958
|
{
|
|
5891
5959
|
instance2.__keepAliveStorageContainer = storageContainer;
|
|
5892
5960
|
}
|
|
5961
|
+
return true;
|
|
5893
5962
|
};
|
|
5894
5963
|
function unmount(vnode) {
|
|
5895
5964
|
resetShapeFlag(vnode);
|
|
@@ -5929,12 +5998,17 @@ const KeepAliveImpl = {
|
|
|
5929
5998
|
const cacheSubtree = () => {
|
|
5930
5999
|
if (pendingCacheKey != null) {
|
|
5931
6000
|
if (isSuspense(instance.subTree.type)) {
|
|
5932
|
-
|
|
6001
|
+
const cacheInnerChild = () => {
|
|
5933
6002
|
const vnode = getInnerChild(instance.subTree);
|
|
5934
6003
|
if (vnode.component) {
|
|
5935
6004
|
cache.set(pendingCacheKey, vnode);
|
|
5936
6005
|
}
|
|
5937
|
-
}
|
|
6006
|
+
};
|
|
6007
|
+
if (instance.subTree.suspense.pendingBranch) {
|
|
6008
|
+
queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
|
|
6009
|
+
} else {
|
|
6010
|
+
cacheInnerChild();
|
|
6011
|
+
}
|
|
5938
6012
|
} else {
|
|
5939
6013
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
5940
6014
|
}
|
|
@@ -6069,9 +6143,12 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
6069
6143
|
true
|
|
6070
6144
|
/* prepend */
|
|
6071
6145
|
);
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6146
|
+
const removal = injectHook(
|
|
6147
|
+
"um",
|
|
6148
|
+
() => remove(keepAliveRoot[type], injected),
|
|
6149
|
+
target
|
|
6150
|
+
);
|
|
6151
|
+
removal.flags = 16;
|
|
6075
6152
|
}
|
|
6076
6153
|
function resetShapeFlag(vnode) {
|
|
6077
6154
|
vnode.shapeFlag &= -257;
|
|
@@ -7805,7 +7882,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7805
7882
|
return vm;
|
|
7806
7883
|
}
|
|
7807
7884
|
}
|
|
7808
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7885
|
+
Vue.version = `2.6.14-compat:${"3.5.45"}`;
|
|
7809
7886
|
Vue.config = singletonApp.config;
|
|
7810
7887
|
Vue.use = (plugin, ...options) => {
|
|
7811
7888
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -9914,6 +9991,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9914
9991
|
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
9915
9992
|
if (needCallTransitionHooks) {
|
|
9916
9993
|
transition.beforeEnter(el);
|
|
9994
|
+
} else if (transition && !transition.persisted) {
|
|
9995
|
+
el[deferredEnterKey] = true;
|
|
9917
9996
|
}
|
|
9918
9997
|
hostInsert(el, container, anchor);
|
|
9919
9998
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
@@ -10412,16 +10491,23 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10412
10491
|
} else {
|
|
10413
10492
|
let { next, bu, u, parent, vnode } = instance;
|
|
10414
10493
|
{
|
|
10415
|
-
const
|
|
10416
|
-
if (
|
|
10494
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
10495
|
+
if (unresolvedAsyncRoot) {
|
|
10417
10496
|
if (next) {
|
|
10418
10497
|
next.el = vnode.el;
|
|
10419
10498
|
updateComponentPreRender(instance, next, optimized);
|
|
10420
10499
|
}
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
if (
|
|
10424
|
-
|
|
10500
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
10501
|
+
const retry = () => {
|
|
10502
|
+
if (instance.job.flags & 8) return;
|
|
10503
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
10504
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10505
|
+
} else {
|
|
10506
|
+
update();
|
|
10507
|
+
}
|
|
10508
|
+
};
|
|
10509
|
+
retry.flags = 16 | 32;
|
|
10510
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10425
10511
|
});
|
|
10426
10512
|
return;
|
|
10427
10513
|
}
|
|
@@ -10463,8 +10549,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10463
10549
|
patch(
|
|
10464
10550
|
prevTree,
|
|
10465
10551
|
nextTree,
|
|
10466
|
-
// parent may have changed if it's in a teleport
|
|
10467
|
-
|
|
10552
|
+
// parent may have changed if it's in a teleport. a root that is a
|
|
10553
|
+
// pending async component only has its placeholder comment
|
|
10554
|
+
hostParentNode(
|
|
10555
|
+
prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
|
|
10556
|
+
),
|
|
10468
10557
|
// anchor may have changed if it's in a fragment
|
|
10469
10558
|
getNextHostNode(prevTree),
|
|
10470
10559
|
instance,
|
|
@@ -10910,8 +10999,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10910
10999
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10911
11000
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10912
11001
|
}
|
|
10913
|
-
if (shapeFlag & 256) {
|
|
10914
|
-
parentComponent.ctx.deactivate(vnode);
|
|
11002
|
+
if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
|
|
10915
11003
|
return;
|
|
10916
11004
|
}
|
|
10917
11005
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -11036,7 +11124,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
11036
11124
|
if (job) {
|
|
11037
11125
|
job.flags |= 8;
|
|
11038
11126
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
11039
|
-
} else if (
|
|
11127
|
+
} else if (subTree) {
|
|
11040
11128
|
subTree.transition = instance.vnode.transition;
|
|
11041
11129
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
11042
11130
|
}
|
|
@@ -11049,9 +11137,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
11049
11137
|
parentSuspense
|
|
11050
11138
|
);
|
|
11051
11139
|
}
|
|
11052
|
-
|
|
11140
|
+
const markUnmounted = () => {
|
|
11053
11141
|
instance.isUnmounted = true;
|
|
11054
|
-
}
|
|
11142
|
+
};
|
|
11143
|
+
markUnmounted.flags = 16;
|
|
11144
|
+
queuePostRenderEffect(markUnmounted, parentSuspense);
|
|
11055
11145
|
{
|
|
11056
11146
|
devtoolsComponentRemoved(instance);
|
|
11057
11147
|
}
|
|
@@ -11203,13 +11293,13 @@ function getSequence(arr) {
|
|
|
11203
11293
|
}
|
|
11204
11294
|
return result;
|
|
11205
11295
|
}
|
|
11206
|
-
function
|
|
11296
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
11207
11297
|
const subComponent = instance.subTree.component;
|
|
11208
11298
|
if (subComponent) {
|
|
11209
11299
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
11210
11300
|
return subComponent;
|
|
11211
11301
|
} else {
|
|
11212
|
-
return
|
|
11302
|
+
return locateUnresolvedAsyncRoot(subComponent);
|
|
11213
11303
|
}
|
|
11214
11304
|
}
|
|
11215
11305
|
}
|
|
@@ -11227,11 +11317,16 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
11227
11317
|
if (instance) {
|
|
11228
11318
|
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
11229
11319
|
}
|
|
11320
|
+
const suspense = anchorVnode.suspense;
|
|
11321
|
+
if (suspense && suspense.activeBranch) {
|
|
11322
|
+
return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
11323
|
+
}
|
|
11230
11324
|
return null;
|
|
11231
11325
|
}
|
|
11232
11326
|
|
|
11233
11327
|
const isSuspense = (type) => type.__isSuspense;
|
|
11234
11328
|
let suspenseId = 0;
|
|
11329
|
+
const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
|
|
11235
11330
|
const SuspenseImpl = {
|
|
11236
11331
|
name: "Suspense",
|
|
11237
11332
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -11253,11 +11348,22 @@ const SuspenseImpl = {
|
|
|
11253
11348
|
rendererInternals
|
|
11254
11349
|
);
|
|
11255
11350
|
} else {
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11351
|
+
const suspense = n1.suspense;
|
|
11352
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
11353
|
+
const owner = suspense.parentComponent;
|
|
11354
|
+
const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
|
|
11355
|
+
if (retained ? (
|
|
11356
|
+
// deps can outlive the pending branch: skip only while it exists
|
|
11357
|
+
parentSuspense.pendingBranch && !isSameVNodeType(
|
|
11358
|
+
n2.ssContent,
|
|
11359
|
+
suspense.pendingBranch || suspense.activeBranch
|
|
11360
|
+
)
|
|
11361
|
+
) : !suspense.isInFallback) {
|
|
11362
|
+
n2.suspense = suspense;
|
|
11363
|
+
suspense.vnode = n2;
|
|
11364
|
+
n2.el = n1.el;
|
|
11365
|
+
return;
|
|
11366
|
+
}
|
|
11261
11367
|
}
|
|
11262
11368
|
patchSuspense(
|
|
11263
11369
|
n1,
|
|
@@ -11282,6 +11388,38 @@ function triggerEvent(vnode, name) {
|
|
|
11282
11388
|
eventListener();
|
|
11283
11389
|
}
|
|
11284
11390
|
}
|
|
11391
|
+
function enterDeferred(branch) {
|
|
11392
|
+
const enters = [];
|
|
11393
|
+
collectDeferredEnters(branch, enters, true);
|
|
11394
|
+
if (enters.length) {
|
|
11395
|
+
queuePostFlushCb(enters);
|
|
11396
|
+
}
|
|
11397
|
+
}
|
|
11398
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
11399
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
11400
|
+
if (shapeFlag & 6) {
|
|
11401
|
+
collectDeferredEnters(vnode.component.subTree, enters, isRoot);
|
|
11402
|
+
return;
|
|
11403
|
+
}
|
|
11404
|
+
if (shapeFlag & (128 | 64)) {
|
|
11405
|
+
return;
|
|
11406
|
+
}
|
|
11407
|
+
if (shapeFlag & 1) {
|
|
11408
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
11409
|
+
el[deferredEnterKey] = void 0;
|
|
11410
|
+
if (transition && !transition.persisted) {
|
|
11411
|
+
transition.beforeEnter(el);
|
|
11412
|
+
enters.push(() => transition.enter(el));
|
|
11413
|
+
}
|
|
11414
|
+
}
|
|
11415
|
+
isRoot = false;
|
|
11416
|
+
}
|
|
11417
|
+
if (shapeFlag & 16) {
|
|
11418
|
+
for (let i = 0; i < children.length; i++) {
|
|
11419
|
+
collectDeferredEnters(children[i], enters, isRoot);
|
|
11420
|
+
}
|
|
11421
|
+
}
|
|
11422
|
+
}
|
|
11285
11423
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
11286
11424
|
const {
|
|
11287
11425
|
p: patch,
|
|
@@ -11381,7 +11519,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11381
11519
|
unmount(pendingBranch, parentComponent, suspense);
|
|
11382
11520
|
}
|
|
11383
11521
|
suspense.deps = 0;
|
|
11384
|
-
suspense
|
|
11522
|
+
discardEffects(suspense);
|
|
11385
11523
|
suspense.hiddenContainer = createElement("div");
|
|
11386
11524
|
if (isInFallback) {
|
|
11387
11525
|
patch(
|
|
@@ -11459,11 +11597,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11459
11597
|
} else {
|
|
11460
11598
|
triggerEvent(n2, "onPending");
|
|
11461
11599
|
suspense.pendingBranch = newBranch;
|
|
11462
|
-
|
|
11463
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
11464
|
-
} else {
|
|
11465
|
-
suspense.pendingId = suspenseId++;
|
|
11466
|
-
}
|
|
11600
|
+
suspense.pendingId = suspenseId++;
|
|
11467
11601
|
patch(
|
|
11468
11602
|
null,
|
|
11469
11603
|
newBranch,
|
|
@@ -11478,12 +11612,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11478
11612
|
if (suspense.deps <= 0) {
|
|
11479
11613
|
suspense.resolve();
|
|
11480
11614
|
} else {
|
|
11481
|
-
const { timeout
|
|
11615
|
+
const { timeout } = suspense;
|
|
11482
11616
|
if (timeout > 0) {
|
|
11483
|
-
setTimeout(() => {
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
}
|
|
11617
|
+
suspense.timeoutTimer = setTimeout(() => {
|
|
11618
|
+
suspense.timeoutTimer = void 0;
|
|
11619
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
11487
11620
|
}, timeout);
|
|
11488
11621
|
} else if (timeout === 0) {
|
|
11489
11622
|
suspense.fallback(newFallback);
|
|
@@ -11530,6 +11663,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11530
11663
|
deps: 0,
|
|
11531
11664
|
pendingId: suspenseId++,
|
|
11532
11665
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11666
|
+
timeoutTimer: void 0,
|
|
11533
11667
|
activeBranch: null,
|
|
11534
11668
|
isFallbackMountPending: false,
|
|
11535
11669
|
pendingBranch: null,
|
|
@@ -11568,7 +11702,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11568
11702
|
let hasUpdatedAnchor = false;
|
|
11569
11703
|
if (delayEnter) {
|
|
11570
11704
|
activeBranch.transition.afterLeave = () => {
|
|
11571
|
-
if (pendingId === suspense.pendingId) {
|
|
11705
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
11706
|
+
enterDeferred(pendingBranch);
|
|
11572
11707
|
move(
|
|
11573
11708
|
pendingBranch,
|
|
11574
11709
|
container2,
|
|
@@ -11583,7 +11718,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11583
11718
|
};
|
|
11584
11719
|
}
|
|
11585
11720
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11586
|
-
if (parentNode(
|
|
11721
|
+
if (parentNode(
|
|
11722
|
+
activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
|
|
11723
|
+
) === container2) {
|
|
11587
11724
|
anchor = next(activeBranch);
|
|
11588
11725
|
hasUpdatedAnchor = true;
|
|
11589
11726
|
}
|
|
@@ -11593,13 +11730,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11593
11730
|
}
|
|
11594
11731
|
}
|
|
11595
11732
|
if (!delayEnter) {
|
|
11733
|
+
enterDeferred(pendingBranch);
|
|
11596
11734
|
move(pendingBranch, container2, anchor, 0);
|
|
11597
11735
|
}
|
|
11598
11736
|
}
|
|
11737
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11738
|
+
suspense.timeoutTimer = void 0;
|
|
11599
11739
|
suspense.isFallbackMountPending = false;
|
|
11600
11740
|
setActiveBranch(suspense, pendingBranch);
|
|
11601
11741
|
suspense.pendingBranch = null;
|
|
11602
11742
|
suspense.isInFallback = false;
|
|
11743
|
+
let kept = 0;
|
|
11744
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11745
|
+
const effect = effects[i];
|
|
11746
|
+
if (effect.flags & 32) {
|
|
11747
|
+
queuePostFlushCb(effect);
|
|
11748
|
+
} else {
|
|
11749
|
+
effects[kept++] = effect;
|
|
11750
|
+
}
|
|
11751
|
+
}
|
|
11752
|
+
effects.length = kept;
|
|
11603
11753
|
let parent = suspense.parent;
|
|
11604
11754
|
let hasUnresolvedAncestor = false;
|
|
11605
11755
|
while (parent) {
|
|
@@ -11628,7 +11778,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11628
11778
|
triggerEvent(vnode2, "onResolve");
|
|
11629
11779
|
},
|
|
11630
11780
|
fallback(fallbackVNode) {
|
|
11631
|
-
if (!suspense.pendingBranch) {
|
|
11781
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) {
|
|
11632
11782
|
return;
|
|
11633
11783
|
}
|
|
11634
11784
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
@@ -11636,7 +11786,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11636
11786
|
const anchor2 = next(activeBranch);
|
|
11637
11787
|
const mountFallback = () => {
|
|
11638
11788
|
suspense.isFallbackMountPending = false;
|
|
11639
|
-
if (!suspense.isInFallback) {
|
|
11789
|
+
if (suspense.isUnmounted || !suspense.isInFallback) {
|
|
11640
11790
|
return;
|
|
11641
11791
|
}
|
|
11642
11792
|
const latestFallback = suspense.vnode.ssFallback;
|
|
@@ -11688,19 +11838,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11688
11838
|
suspense.deps++;
|
|
11689
11839
|
}
|
|
11690
11840
|
const hydratedEl = instance.vnode.el;
|
|
11691
|
-
|
|
11692
|
-
handleError(err, instance, 0);
|
|
11693
|
-
}).then((asyncSetupResult) => {
|
|
11694
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11695
|
-
return;
|
|
11696
|
-
}
|
|
11697
|
-
unsetCurrentInstance();
|
|
11698
|
-
if (!instance.scope.active) {
|
|
11699
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11700
|
-
suspense.resolve();
|
|
11701
|
-
}
|
|
11702
|
-
return;
|
|
11703
|
-
}
|
|
11841
|
+
const render = (asyncSetupResult) => {
|
|
11704
11842
|
instance.asyncResolved = true;
|
|
11705
11843
|
const { vnode: vnode2 } = instance;
|
|
11706
11844
|
{
|
|
@@ -11733,13 +11871,57 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11733
11871
|
{
|
|
11734
11872
|
popWarningContext();
|
|
11735
11873
|
}
|
|
11736
|
-
|
|
11874
|
+
};
|
|
11875
|
+
instance.asyncDep.catch((err) => {
|
|
11876
|
+
handleError(err, instance, 0, false, true);
|
|
11877
|
+
return () => null;
|
|
11878
|
+
}).then((asyncSetupResult) => {
|
|
11879
|
+
if (instance.isUnmounted || suspense.isUnmounted) {
|
|
11880
|
+
return;
|
|
11881
|
+
}
|
|
11882
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
11883
|
+
unsetCurrentInstance();
|
|
11884
|
+
if (!instance.scope.active) {
|
|
11885
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11886
|
+
suspense.resolve();
|
|
11887
|
+
}
|
|
11888
|
+
return;
|
|
11889
|
+
}
|
|
11890
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
11891
|
+
const job = () => {
|
|
11892
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
|
|
11893
|
+
return;
|
|
11894
|
+
}
|
|
11895
|
+
if (suspense.pendingBranch) {
|
|
11896
|
+
queueEffectWithSuspense(job, suspense);
|
|
11897
|
+
} else {
|
|
11898
|
+
render(asyncSetupResult);
|
|
11899
|
+
}
|
|
11900
|
+
};
|
|
11901
|
+
job.flags = 16 | 32;
|
|
11902
|
+
queueEffectWithSuspense(job, suspense);
|
|
11903
|
+
return;
|
|
11904
|
+
}
|
|
11905
|
+
render(asyncSetupResult);
|
|
11906
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11737
11907
|
suspense.resolve();
|
|
11738
11908
|
}
|
|
11739
11909
|
});
|
|
11740
11910
|
},
|
|
11741
11911
|
unmount(parentSuspense2, doRemove) {
|
|
11742
11912
|
suspense.isUnmounted = true;
|
|
11913
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11914
|
+
suspense.timeoutTimer = void 0;
|
|
11915
|
+
if (parentSuspenseId !== void 0) {
|
|
11916
|
+
const parent = suspense.parent;
|
|
11917
|
+
const pendingId = parentSuspenseId;
|
|
11918
|
+
parentSuspenseId = void 0;
|
|
11919
|
+
queuePostFlushCb(() => {
|
|
11920
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
|
|
11921
|
+
parent.resolve();
|
|
11922
|
+
}
|
|
11923
|
+
});
|
|
11924
|
+
}
|
|
11743
11925
|
if (suspense.activeBranch) {
|
|
11744
11926
|
unmount(
|
|
11745
11927
|
suspense.activeBranch,
|
|
@@ -11749,12 +11931,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11749
11931
|
);
|
|
11750
11932
|
}
|
|
11751
11933
|
if (suspense.pendingBranch) {
|
|
11752
|
-
unmount(
|
|
11753
|
-
|
|
11754
|
-
parentComponent,
|
|
11755
|
-
parentSuspense2,
|
|
11756
|
-
doRemove
|
|
11757
|
-
);
|
|
11934
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
11935
|
+
discardEffects(suspense);
|
|
11758
11936
|
}
|
|
11759
11937
|
}
|
|
11760
11938
|
};
|
|
@@ -11824,6 +12002,16 @@ function normalizeSuspenseSlot(s) {
|
|
|
11824
12002
|
}
|
|
11825
12003
|
return s;
|
|
11826
12004
|
}
|
|
12005
|
+
function discardEffects(suspense) {
|
|
12006
|
+
const { effects } = suspense;
|
|
12007
|
+
for (let i = 0; i < effects.length; i++) {
|
|
12008
|
+
const effect = effects[i];
|
|
12009
|
+
if (effect.flags & 16) {
|
|
12010
|
+
queuePostFlushCb(effect);
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
12013
|
+
effects.length = 0;
|
|
12014
|
+
}
|
|
11827
12015
|
function queueEffectWithSuspense(fn, suspense) {
|
|
11828
12016
|
if (suspense && suspense.pendingBranch) {
|
|
11829
12017
|
if (isArray(fn)) {
|
|
@@ -12139,7 +12327,8 @@ Component that was made reactive: `,
|
|
|
12139
12327
|
}
|
|
12140
12328
|
function guardReactiveProps(props) {
|
|
12141
12329
|
if (!props) return null;
|
|
12142
|
-
|
|
12330
|
+
if (isProxy(props)) return extend({}, props);
|
|
12331
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
12143
12332
|
}
|
|
12144
12333
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
12145
12334
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -12321,7 +12510,7 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
12321
12510
|
]);
|
|
12322
12511
|
}
|
|
12323
12512
|
|
|
12324
|
-
const emptyAppContext = createAppContext();
|
|
12513
|
+
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
12325
12514
|
let uid = 0;
|
|
12326
12515
|
function getNextUid() {
|
|
12327
12516
|
return uid;
|
|
@@ -12534,7 +12723,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
12534
12723
|
setInSSRSetupState(false);
|
|
12535
12724
|
}
|
|
12536
12725
|
}).catch((e) => {
|
|
12537
|
-
handleError(e, instance, 0);
|
|
12726
|
+
handleError(e, instance, 0, void 0, true);
|
|
12727
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
12538
12728
|
});
|
|
12539
12729
|
} else {
|
|
12540
12730
|
instance.asyncDep = setupResult;
|
|
@@ -12654,11 +12844,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
12654
12844
|
}
|
|
12655
12845
|
}
|
|
12656
12846
|
}
|
|
12847
|
+
const rawAttrsKey = /* @__PURE__ */ Symbol();
|
|
12657
12848
|
const attrsProxyHandlers = {
|
|
12658
12849
|
get(target, key) {
|
|
12659
12850
|
markAttrsAccessed();
|
|
12660
12851
|
track(target, "get", "");
|
|
12661
|
-
return target[key];
|
|
12852
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12662
12853
|
},
|
|
12663
12854
|
set() {
|
|
12664
12855
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -13010,7 +13201,7 @@ function isMemoSame(cached, memo) {
|
|
|
13010
13201
|
return true;
|
|
13011
13202
|
}
|
|
13012
13203
|
|
|
13013
|
-
const version = "3.5.
|
|
13204
|
+
const version = "3.5.45";
|
|
13014
13205
|
const warn = warn$1 ;
|
|
13015
13206
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
13016
13207
|
const devtools = devtools$1 ;
|
|
@@ -14912,18 +15103,18 @@ const vModelSelect = {
|
|
|
14912
15103
|
},
|
|
14913
15104
|
// set value in mounted & updated because <select> relies on its children
|
|
14914
15105
|
// <option>s.
|
|
14915
|
-
mounted(el, { value }) {
|
|
14916
|
-
setSelected(el, value);
|
|
15106
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
15107
|
+
setSelected(el, value, number);
|
|
14917
15108
|
},
|
|
14918
15109
|
beforeUpdate(el, { value }, vnode) {
|
|
14919
15110
|
el._modelValue = value;
|
|
14920
15111
|
el[assignKey] = getModelAssigner(vnode);
|
|
14921
15112
|
},
|
|
14922
|
-
updated(el, { value }) {
|
|
15113
|
+
updated(el, { value, modifiers: { number } }) {
|
|
14923
15114
|
const pending = el._pendingValue;
|
|
14924
15115
|
el._pendingValue = void 0;
|
|
14925
15116
|
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14926
|
-
setSelected(el, value);
|
|
15117
|
+
setSelected(el, value, number);
|
|
14927
15118
|
}
|
|
14928
15119
|
}
|
|
14929
15120
|
};
|
|
@@ -14939,7 +15130,7 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
14939
15130
|
}
|
|
14940
15131
|
return false;
|
|
14941
15132
|
}
|
|
14942
|
-
function setSelected(el, value) {
|
|
15133
|
+
function setSelected(el, value, number = false) {
|
|
14943
15134
|
const isMultiple = el.multiple;
|
|
14944
15135
|
const isArrayValue = isArray(value);
|
|
14945
15136
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -14960,7 +15151,7 @@ function setSelected(el, value) {
|
|
|
14960
15151
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
14961
15152
|
}
|
|
14962
15153
|
} else {
|
|
14963
|
-
option.selected = value.has(optionValue);
|
|
15154
|
+
option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
14964
15155
|
}
|
|
14965
15156
|
} else if (looseEqual(getValue(option), value)) {
|
|
14966
15157
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
@@ -17645,7 +17836,11 @@ function getLoc(start, end) {
|
|
|
17645
17836
|
};
|
|
17646
17837
|
}
|
|
17647
17838
|
function cloneLoc(loc) {
|
|
17648
|
-
return
|
|
17839
|
+
return {
|
|
17840
|
+
start: extend({}, loc.start),
|
|
17841
|
+
end: extend({}, loc.end),
|
|
17842
|
+
source: loc.source
|
|
17843
|
+
};
|
|
17649
17844
|
}
|
|
17650
17845
|
function setLocEnd(loc, end) {
|
|
17651
17846
|
loc.end = tokenizer.getPos(end);
|