@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
|
@@ -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
|
**/
|
|
@@ -64,24 +64,20 @@ var Vue = (function () {
|
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
const camelizeRE = /-\w/g;
|
|
67
|
-
const camelize = cacheStringFunction(
|
|
68
|
-
(
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
);
|
|
67
|
+
const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
68
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
69
|
+
});
|
|
72
70
|
const hyphenateRE = /\B([A-Z])/g;
|
|
73
|
-
const hyphenate = cacheStringFunction(
|
|
71
|
+
const hyphenate = /* @__PURE__ */ cacheStringFunction(
|
|
74
72
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
75
73
|
);
|
|
76
|
-
const capitalize = cacheStringFunction((str) => {
|
|
74
|
+
const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
77
75
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
78
76
|
});
|
|
79
|
-
const toHandlerKey = cacheStringFunction(
|
|
80
|
-
(str)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
);
|
|
77
|
+
const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
78
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
79
|
+
return s;
|
|
80
|
+
});
|
|
85
81
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
86
82
|
const invokeArrayFns = (fns, ...arg) => {
|
|
87
83
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -194,7 +190,7 @@ var Vue = (function () {
|
|
|
194
190
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
195
191
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
196
192
|
|
|
197
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
193
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
198
194
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
199
195
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
200
196
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -538,7 +534,11 @@ var Vue = (function () {
|
|
|
538
534
|
}
|
|
539
535
|
function onScopeDispose(fn, failSilently = false) {
|
|
540
536
|
if (activeEffectScope) {
|
|
541
|
-
activeEffectScope.
|
|
537
|
+
if (activeEffectScope.active) {
|
|
538
|
+
activeEffectScope.cleanups.push(fn);
|
|
539
|
+
} else {
|
|
540
|
+
fn();
|
|
541
|
+
}
|
|
542
542
|
} else if (!failSilently) {
|
|
543
543
|
warn$2(
|
|
544
544
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
@@ -1345,7 +1345,7 @@ var Vue = (function () {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
1347
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1348
|
-
const builtInSymbols = new Set(
|
|
1348
|
+
const builtInSymbols = /* @__PURE__ */ new Set(
|
|
1349
1349
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1350
1350
|
);
|
|
1351
1351
|
function hasOwnProperty(key) {
|
|
@@ -2555,7 +2555,7 @@ var Vue = (function () {
|
|
|
2555
2555
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2556
2556
|
if (res && isPromise(res)) {
|
|
2557
2557
|
res.catch((err) => {
|
|
2558
|
-
handleError(err, instance, type);
|
|
2558
|
+
handleError(err, instance, type, void 0, true);
|
|
2559
2559
|
});
|
|
2560
2560
|
}
|
|
2561
2561
|
return res;
|
|
@@ -2572,7 +2572,7 @@ var Vue = (function () {
|
|
|
2572
2572
|
);
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2575
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2576
2576
|
const contextVNode = instance ? instance.vnode : null;
|
|
2577
2577
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2578
2578
|
if (instance) {
|
|
@@ -2581,7 +2581,9 @@ var Vue = (function () {
|
|
|
2581
2581
|
const errorInfo = ErrorTypeStrings$1[type] ;
|
|
2582
2582
|
while (cur) {
|
|
2583
2583
|
const errorCapturedHooks = cur.ec;
|
|
2584
|
-
if (errorCapturedHooks
|
|
2584
|
+
if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
|
|
2585
|
+
// are deferred or discarded by Suspense.
|
|
2586
|
+
(!isAsyncError || cur.scope.active)) {
|
|
2585
2587
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
2586
2588
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
2587
2589
|
return;
|
|
@@ -2909,14 +2911,32 @@ var Vue = (function () {
|
|
|
2909
2911
|
instance.ceReload(newComp.styles);
|
|
2910
2912
|
dirtyInstances.delete(instance);
|
|
2911
2913
|
} else if (instance.parent) {
|
|
2912
|
-
|
|
2913
|
-
if (!
|
|
2914
|
-
|
|
2914
|
+
const update = () => {
|
|
2915
|
+
if (!instance.scope.active) return;
|
|
2916
|
+
const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
|
|
2917
|
+
if (pending) {
|
|
2918
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
2919
|
+
if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
|
|
2920
|
+
queueJob(update);
|
|
2921
|
+
}
|
|
2922
|
+
});
|
|
2923
|
+
return;
|
|
2924
|
+
}
|
|
2925
|
+
dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2926
|
+
if (!dirtyInstances) {
|
|
2927
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2928
|
+
}
|
|
2929
|
+
dirtyInstances.add(instance);
|
|
2930
|
+
isHmrUpdating = true;
|
|
2931
|
+
try {
|
|
2915
2932
|
instance.parent.update();
|
|
2933
|
+
} finally {
|
|
2916
2934
|
isHmrUpdating = false;
|
|
2917
2935
|
dirtyInstances.delete(instance);
|
|
2936
|
+
queuePostFlushCb(() => hmrDirtyComponents.clear());
|
|
2918
2937
|
}
|
|
2919
|
-
}
|
|
2938
|
+
};
|
|
2939
|
+
queueJob(update);
|
|
2920
2940
|
} else if (instance.appContext.reload) {
|
|
2921
2941
|
instance.appContext.reload();
|
|
2922
2942
|
} else if (typeof window !== "undefined") {
|
|
@@ -3598,12 +3618,31 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3598
3618
|
return vnode;
|
|
3599
3619
|
}
|
|
3600
3620
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3601
|
-
|
|
3621
|
+
let hookVNode = vnode;
|
|
3622
|
+
if (name === "beforeMount") {
|
|
3623
|
+
vnode._mount = vnode;
|
|
3624
|
+
} else if (name === "beforeUpdate") {
|
|
3625
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3626
|
+
if (mount) {
|
|
3627
|
+
mount._latest = vnode;
|
|
3628
|
+
vnode._mount = mount;
|
|
3629
|
+
}
|
|
3630
|
+
} else if (name === "mounted") {
|
|
3631
|
+
const latest = vnode._latest;
|
|
3632
|
+
vnode._mount = vnode._latest = void 0;
|
|
3633
|
+
if (latest) {
|
|
3634
|
+
hookVNode = latest;
|
|
3635
|
+
latest._mount = void 0;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
const bindings = hookVNode.dirs;
|
|
3602
3639
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3603
3640
|
for (let i = 0; i < bindings.length; i++) {
|
|
3604
|
-
|
|
3641
|
+
let binding = bindings[i];
|
|
3605
3642
|
if (oldBindings) {
|
|
3606
3643
|
binding.oldValue = oldBindings[i].value;
|
|
3644
|
+
} else if (name === "mounted" && binding.oldValue !== void 0) {
|
|
3645
|
+
binding = extend({}, binding, { oldValue: void 0 });
|
|
3607
3646
|
}
|
|
3608
3647
|
let hook = binding.dir[name];
|
|
3609
3648
|
if (!hook) {
|
|
@@ -3614,7 +3653,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3614
3653
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3615
3654
|
vnode.el,
|
|
3616
3655
|
binding,
|
|
3617
|
-
|
|
3656
|
+
hookVNode,
|
|
3618
3657
|
prevVNode
|
|
3619
3658
|
]);
|
|
3620
3659
|
resetTracking();
|
|
@@ -4210,13 +4249,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4210
4249
|
if (!innerChild) {
|
|
4211
4250
|
return emptyPlaceholder(child);
|
|
4212
4251
|
}
|
|
4213
|
-
|
|
4252
|
+
const enterHooks = resolveTransitionHooks(
|
|
4214
4253
|
innerChild,
|
|
4215
4254
|
rawProps,
|
|
4216
4255
|
state,
|
|
4217
|
-
instance
|
|
4218
|
-
// #11061, ensure enterHooks is fresh after clone
|
|
4219
|
-
(hooks) => enterHooks = hooks
|
|
4256
|
+
instance
|
|
4220
4257
|
);
|
|
4221
4258
|
if (innerChild.type !== Comment) {
|
|
4222
4259
|
setTransitionHooks(innerChild, enterHooks);
|
|
@@ -4235,7 +4272,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4235
4272
|
leavingHooks.afterLeave = () => {
|
|
4236
4273
|
state.isLeaving = false;
|
|
4237
4274
|
if (!(instance.job.flags & 8)) {
|
|
4238
|
-
instance.
|
|
4275
|
+
if (instance.effect.flags & 2) {
|
|
4276
|
+
const job = () => {
|
|
4277
|
+
if (!(instance.job.flags & 8)) {
|
|
4278
|
+
instance.update();
|
|
4279
|
+
}
|
|
4280
|
+
};
|
|
4281
|
+
job.i = instance;
|
|
4282
|
+
queueJob(job);
|
|
4283
|
+
} else {
|
|
4284
|
+
instance.update();
|
|
4285
|
+
}
|
|
4239
4286
|
}
|
|
4240
4287
|
delete leavingHooks.afterLeave;
|
|
4241
4288
|
oldInnerChild = void 0;
|
|
@@ -4302,7 +4349,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4302
4349
|
}
|
|
4303
4350
|
return leavingVNodesCache;
|
|
4304
4351
|
}
|
|
4305
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4352
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4306
4353
|
const {
|
|
4307
4354
|
appear,
|
|
4308
4355
|
mode,
|
|
@@ -4441,15 +4488,21 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4441
4488
|
}
|
|
4442
4489
|
},
|
|
4443
4490
|
clone(vnode2) {
|
|
4444
|
-
const
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4491
|
+
const cloned = resolveTransitionHooks(vnode2, props, state, instance);
|
|
4492
|
+
cloned.afterLeave = () => {
|
|
4493
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4494
|
+
};
|
|
4495
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4496
|
+
if (hooks.delayLeave) {
|
|
4497
|
+
hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4498
|
+
} else {
|
|
4499
|
+
delayedLeave();
|
|
4500
|
+
}
|
|
4501
|
+
};
|
|
4502
|
+
cloned.delayedLeave = () => {
|
|
4503
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4504
|
+
};
|
|
4505
|
+
return cloned;
|
|
4453
4506
|
}
|
|
4454
4507
|
};
|
|
4455
4508
|
return hooks;
|
|
@@ -4490,8 +4543,16 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4490
4543
|
hooks
|
|
4491
4544
|
);
|
|
4492
4545
|
} else if (vnode.shapeFlag & 128) {
|
|
4493
|
-
|
|
4494
|
-
|
|
4546
|
+
const suspense = vnode.suspense;
|
|
4547
|
+
if (suspense) {
|
|
4548
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4549
|
+
if (branch) {
|
|
4550
|
+
setTransitionHooks(branch, hooks.clone(branch));
|
|
4551
|
+
}
|
|
4552
|
+
} else {
|
|
4553
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4554
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4555
|
+
}
|
|
4495
4556
|
} else {
|
|
4496
4557
|
vnode.transition = hooks;
|
|
4497
4558
|
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
@@ -5192,7 +5253,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5192
5253
|
getContainerType(container),
|
|
5193
5254
|
slotScopeIds
|
|
5194
5255
|
);
|
|
5195
|
-
if (parentComponent) {
|
|
5256
|
+
if (parentComponent && parentComponent.vnode.el === node) {
|
|
5196
5257
|
parentComponent.vnode.el = vnode.el;
|
|
5197
5258
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
5198
5259
|
}
|
|
@@ -5626,7 +5687,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5626
5687
|
err,
|
|
5627
5688
|
instance,
|
|
5628
5689
|
13,
|
|
5629
|
-
!errorComponent
|
|
5690
|
+
!errorComponent,
|
|
5691
|
+
true
|
|
5630
5692
|
);
|
|
5631
5693
|
};
|
|
5632
5694
|
if (suspensible && instance.suspense || false) {
|
|
@@ -5644,7 +5706,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5644
5706
|
const delayed = ref(!!delay);
|
|
5645
5707
|
let timeoutTimer;
|
|
5646
5708
|
let delayTimer;
|
|
5647
|
-
|
|
5709
|
+
onScopeDispose(() => {
|
|
5648
5710
|
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5649
5711
|
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5650
5712
|
});
|
|
@@ -5766,6 +5828,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5766
5828
|
}
|
|
5767
5829
|
};
|
|
5768
5830
|
sharedContext.deactivate = (vnode) => {
|
|
5831
|
+
const cached = cache.get(
|
|
5832
|
+
vnode.key == null ? vnode.type : vnode.key
|
|
5833
|
+
);
|
|
5834
|
+
if (!cached || cached.component !== vnode.component) {
|
|
5835
|
+
return false;
|
|
5836
|
+
}
|
|
5769
5837
|
const instance2 = vnode.component;
|
|
5770
5838
|
invalidateMount(instance2.m);
|
|
5771
5839
|
invalidateMount(instance2.a);
|
|
@@ -5786,6 +5854,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5786
5854
|
{
|
|
5787
5855
|
instance2.__keepAliveStorageContainer = storageContainer;
|
|
5788
5856
|
}
|
|
5857
|
+
return true;
|
|
5789
5858
|
};
|
|
5790
5859
|
function unmount(vnode) {
|
|
5791
5860
|
resetShapeFlag(vnode);
|
|
@@ -5825,12 +5894,17 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5825
5894
|
const cacheSubtree = () => {
|
|
5826
5895
|
if (pendingCacheKey != null) {
|
|
5827
5896
|
if (isSuspense(instance.subTree.type)) {
|
|
5828
|
-
|
|
5897
|
+
const cacheInnerChild = () => {
|
|
5829
5898
|
const vnode = getInnerChild(instance.subTree);
|
|
5830
5899
|
if (vnode.component) {
|
|
5831
5900
|
cache.set(pendingCacheKey, vnode);
|
|
5832
5901
|
}
|
|
5833
|
-
}
|
|
5902
|
+
};
|
|
5903
|
+
if (instance.subTree.suspense.pendingBranch) {
|
|
5904
|
+
queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
|
|
5905
|
+
} else {
|
|
5906
|
+
cacheInnerChild();
|
|
5907
|
+
}
|
|
5834
5908
|
} else {
|
|
5835
5909
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
5836
5910
|
}
|
|
@@ -5965,9 +6039,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5965
6039
|
true
|
|
5966
6040
|
/* prepend */
|
|
5967
6041
|
);
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
6042
|
+
const removal = injectHook(
|
|
6043
|
+
"um",
|
|
6044
|
+
() => remove(keepAliveRoot[type], injected),
|
|
6045
|
+
target
|
|
6046
|
+
);
|
|
6047
|
+
removal.flags = 16;
|
|
5971
6048
|
}
|
|
5972
6049
|
function resetShapeFlag(vnode) {
|
|
5973
6050
|
vnode.shapeFlag &= -257;
|
|
@@ -7698,7 +7775,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7698
7775
|
return vm;
|
|
7699
7776
|
}
|
|
7700
7777
|
}
|
|
7701
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7778
|
+
Vue.version = `2.6.14-compat:${"3.5.45"}`;
|
|
7702
7779
|
Vue.config = singletonApp.config;
|
|
7703
7780
|
Vue.use = (plugin, ...options) => {
|
|
7704
7781
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -9807,6 +9884,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9807
9884
|
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
9808
9885
|
if (needCallTransitionHooks) {
|
|
9809
9886
|
transition.beforeEnter(el);
|
|
9887
|
+
} else if (transition && !transition.persisted) {
|
|
9888
|
+
el[deferredEnterKey] = true;
|
|
9810
9889
|
}
|
|
9811
9890
|
hostInsert(el, container, anchor);
|
|
9812
9891
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
@@ -10305,16 +10384,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10305
10384
|
} else {
|
|
10306
10385
|
let { next, bu, u, parent, vnode } = instance;
|
|
10307
10386
|
{
|
|
10308
|
-
const
|
|
10309
|
-
if (
|
|
10387
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
10388
|
+
if (unresolvedAsyncRoot) {
|
|
10310
10389
|
if (next) {
|
|
10311
10390
|
next.el = vnode.el;
|
|
10312
10391
|
updateComponentPreRender(instance, next, optimized);
|
|
10313
10392
|
}
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
if (
|
|
10317
|
-
|
|
10393
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
10394
|
+
const retry = () => {
|
|
10395
|
+
if (instance.job.flags & 8) return;
|
|
10396
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
10397
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10398
|
+
} else {
|
|
10399
|
+
update();
|
|
10400
|
+
}
|
|
10401
|
+
};
|
|
10402
|
+
retry.flags = 16 | 32;
|
|
10403
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10318
10404
|
});
|
|
10319
10405
|
return;
|
|
10320
10406
|
}
|
|
@@ -10356,8 +10442,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10356
10442
|
patch(
|
|
10357
10443
|
prevTree,
|
|
10358
10444
|
nextTree,
|
|
10359
|
-
// parent may have changed if it's in a teleport
|
|
10360
|
-
|
|
10445
|
+
// parent may have changed if it's in a teleport. a root that is a
|
|
10446
|
+
// pending async component only has its placeholder comment
|
|
10447
|
+
hostParentNode(
|
|
10448
|
+
prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
|
|
10449
|
+
),
|
|
10361
10450
|
// anchor may have changed if it's in a fragment
|
|
10362
10451
|
getNextHostNode(prevTree),
|
|
10363
10452
|
instance,
|
|
@@ -10803,8 +10892,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10803
10892
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10804
10893
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10805
10894
|
}
|
|
10806
|
-
if (shapeFlag & 256) {
|
|
10807
|
-
parentComponent.ctx.deactivate(vnode);
|
|
10895
|
+
if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
|
|
10808
10896
|
return;
|
|
10809
10897
|
}
|
|
10810
10898
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10929,7 +11017,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10929
11017
|
if (job) {
|
|
10930
11018
|
job.flags |= 8;
|
|
10931
11019
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10932
|
-
} else if (
|
|
11020
|
+
} else if (subTree) {
|
|
10933
11021
|
subTree.transition = instance.vnode.transition;
|
|
10934
11022
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10935
11023
|
}
|
|
@@ -10942,9 +11030,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10942
11030
|
parentSuspense
|
|
10943
11031
|
);
|
|
10944
11032
|
}
|
|
10945
|
-
|
|
11033
|
+
const markUnmounted = () => {
|
|
10946
11034
|
instance.isUnmounted = true;
|
|
10947
|
-
}
|
|
11035
|
+
};
|
|
11036
|
+
markUnmounted.flags = 16;
|
|
11037
|
+
queuePostRenderEffect(markUnmounted, parentSuspense);
|
|
10948
11038
|
{
|
|
10949
11039
|
devtoolsComponentRemoved(instance);
|
|
10950
11040
|
}
|
|
@@ -11096,13 +11186,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11096
11186
|
}
|
|
11097
11187
|
return result;
|
|
11098
11188
|
}
|
|
11099
|
-
function
|
|
11189
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
11100
11190
|
const subComponent = instance.subTree.component;
|
|
11101
11191
|
if (subComponent) {
|
|
11102
11192
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
11103
11193
|
return subComponent;
|
|
11104
11194
|
} else {
|
|
11105
|
-
return
|
|
11195
|
+
return locateUnresolvedAsyncRoot(subComponent);
|
|
11106
11196
|
}
|
|
11107
11197
|
}
|
|
11108
11198
|
}
|
|
@@ -11120,11 +11210,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11120
11210
|
if (instance) {
|
|
11121
11211
|
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
11122
11212
|
}
|
|
11213
|
+
const suspense = anchorVnode.suspense;
|
|
11214
|
+
if (suspense && suspense.activeBranch) {
|
|
11215
|
+
return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
11216
|
+
}
|
|
11123
11217
|
return null;
|
|
11124
11218
|
}
|
|
11125
11219
|
|
|
11126
11220
|
const isSuspense = (type) => type.__isSuspense;
|
|
11127
11221
|
let suspenseId = 0;
|
|
11222
|
+
const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
|
|
11128
11223
|
const SuspenseImpl = {
|
|
11129
11224
|
name: "Suspense",
|
|
11130
11225
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -11146,11 +11241,22 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11146
11241
|
rendererInternals
|
|
11147
11242
|
);
|
|
11148
11243
|
} else {
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11244
|
+
const suspense = n1.suspense;
|
|
11245
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
11246
|
+
const owner = suspense.parentComponent;
|
|
11247
|
+
const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
|
|
11248
|
+
if (retained ? (
|
|
11249
|
+
// deps can outlive the pending branch: skip only while it exists
|
|
11250
|
+
parentSuspense.pendingBranch && !isSameVNodeType(
|
|
11251
|
+
n2.ssContent,
|
|
11252
|
+
suspense.pendingBranch || suspense.activeBranch
|
|
11253
|
+
)
|
|
11254
|
+
) : !suspense.isInFallback) {
|
|
11255
|
+
n2.suspense = suspense;
|
|
11256
|
+
suspense.vnode = n2;
|
|
11257
|
+
n2.el = n1.el;
|
|
11258
|
+
return;
|
|
11259
|
+
}
|
|
11154
11260
|
}
|
|
11155
11261
|
patchSuspense(
|
|
11156
11262
|
n1,
|
|
@@ -11175,6 +11281,38 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11175
11281
|
eventListener();
|
|
11176
11282
|
}
|
|
11177
11283
|
}
|
|
11284
|
+
function enterDeferred(branch) {
|
|
11285
|
+
const enters = [];
|
|
11286
|
+
collectDeferredEnters(branch, enters, true);
|
|
11287
|
+
if (enters.length) {
|
|
11288
|
+
queuePostFlushCb(enters);
|
|
11289
|
+
}
|
|
11290
|
+
}
|
|
11291
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
11292
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
11293
|
+
if (shapeFlag & 6) {
|
|
11294
|
+
collectDeferredEnters(vnode.component.subTree, enters, isRoot);
|
|
11295
|
+
return;
|
|
11296
|
+
}
|
|
11297
|
+
if (shapeFlag & (128 | 64)) {
|
|
11298
|
+
return;
|
|
11299
|
+
}
|
|
11300
|
+
if (shapeFlag & 1) {
|
|
11301
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
11302
|
+
el[deferredEnterKey] = void 0;
|
|
11303
|
+
if (transition && !transition.persisted) {
|
|
11304
|
+
transition.beforeEnter(el);
|
|
11305
|
+
enters.push(() => transition.enter(el));
|
|
11306
|
+
}
|
|
11307
|
+
}
|
|
11308
|
+
isRoot = false;
|
|
11309
|
+
}
|
|
11310
|
+
if (shapeFlag & 16) {
|
|
11311
|
+
for (let i = 0; i < children.length; i++) {
|
|
11312
|
+
collectDeferredEnters(children[i], enters, isRoot);
|
|
11313
|
+
}
|
|
11314
|
+
}
|
|
11315
|
+
}
|
|
11178
11316
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
11179
11317
|
const {
|
|
11180
11318
|
p: patch,
|
|
@@ -11274,7 +11412,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11274
11412
|
unmount(pendingBranch, parentComponent, suspense);
|
|
11275
11413
|
}
|
|
11276
11414
|
suspense.deps = 0;
|
|
11277
|
-
suspense
|
|
11415
|
+
discardEffects(suspense);
|
|
11278
11416
|
suspense.hiddenContainer = createElement("div");
|
|
11279
11417
|
if (isInFallback) {
|
|
11280
11418
|
patch(
|
|
@@ -11352,11 +11490,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11352
11490
|
} else {
|
|
11353
11491
|
triggerEvent(n2, "onPending");
|
|
11354
11492
|
suspense.pendingBranch = newBranch;
|
|
11355
|
-
|
|
11356
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
11357
|
-
} else {
|
|
11358
|
-
suspense.pendingId = suspenseId++;
|
|
11359
|
-
}
|
|
11493
|
+
suspense.pendingId = suspenseId++;
|
|
11360
11494
|
patch(
|
|
11361
11495
|
null,
|
|
11362
11496
|
newBranch,
|
|
@@ -11371,12 +11505,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11371
11505
|
if (suspense.deps <= 0) {
|
|
11372
11506
|
suspense.resolve();
|
|
11373
11507
|
} else {
|
|
11374
|
-
const { timeout
|
|
11508
|
+
const { timeout } = suspense;
|
|
11375
11509
|
if (timeout > 0) {
|
|
11376
|
-
setTimeout(() => {
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
}
|
|
11510
|
+
suspense.timeoutTimer = setTimeout(() => {
|
|
11511
|
+
suspense.timeoutTimer = void 0;
|
|
11512
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
11380
11513
|
}, timeout);
|
|
11381
11514
|
} else if (timeout === 0) {
|
|
11382
11515
|
suspense.fallback(newFallback);
|
|
@@ -11423,6 +11556,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11423
11556
|
deps: 0,
|
|
11424
11557
|
pendingId: suspenseId++,
|
|
11425
11558
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11559
|
+
timeoutTimer: void 0,
|
|
11426
11560
|
activeBranch: null,
|
|
11427
11561
|
isFallbackMountPending: false,
|
|
11428
11562
|
pendingBranch: null,
|
|
@@ -11461,7 +11595,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11461
11595
|
let hasUpdatedAnchor = false;
|
|
11462
11596
|
if (delayEnter) {
|
|
11463
11597
|
activeBranch.transition.afterLeave = () => {
|
|
11464
|
-
if (pendingId === suspense.pendingId) {
|
|
11598
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
11599
|
+
enterDeferred(pendingBranch);
|
|
11465
11600
|
move(
|
|
11466
11601
|
pendingBranch,
|
|
11467
11602
|
container2,
|
|
@@ -11476,7 +11611,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11476
11611
|
};
|
|
11477
11612
|
}
|
|
11478
11613
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11479
|
-
if (parentNode(
|
|
11614
|
+
if (parentNode(
|
|
11615
|
+
activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
|
|
11616
|
+
) === container2) {
|
|
11480
11617
|
anchor = next(activeBranch);
|
|
11481
11618
|
hasUpdatedAnchor = true;
|
|
11482
11619
|
}
|
|
@@ -11486,13 +11623,26 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11486
11623
|
}
|
|
11487
11624
|
}
|
|
11488
11625
|
if (!delayEnter) {
|
|
11626
|
+
enterDeferred(pendingBranch);
|
|
11489
11627
|
move(pendingBranch, container2, anchor, 0);
|
|
11490
11628
|
}
|
|
11491
11629
|
}
|
|
11630
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11631
|
+
suspense.timeoutTimer = void 0;
|
|
11492
11632
|
suspense.isFallbackMountPending = false;
|
|
11493
11633
|
setActiveBranch(suspense, pendingBranch);
|
|
11494
11634
|
suspense.pendingBranch = null;
|
|
11495
11635
|
suspense.isInFallback = false;
|
|
11636
|
+
let kept = 0;
|
|
11637
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11638
|
+
const effect = effects[i];
|
|
11639
|
+
if (effect.flags & 32) {
|
|
11640
|
+
queuePostFlushCb(effect);
|
|
11641
|
+
} else {
|
|
11642
|
+
effects[kept++] = effect;
|
|
11643
|
+
}
|
|
11644
|
+
}
|
|
11645
|
+
effects.length = kept;
|
|
11496
11646
|
let parent = suspense.parent;
|
|
11497
11647
|
let hasUnresolvedAncestor = false;
|
|
11498
11648
|
while (parent) {
|
|
@@ -11521,7 +11671,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11521
11671
|
triggerEvent(vnode2, "onResolve");
|
|
11522
11672
|
},
|
|
11523
11673
|
fallback(fallbackVNode) {
|
|
11524
|
-
if (!suspense.pendingBranch) {
|
|
11674
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) {
|
|
11525
11675
|
return;
|
|
11526
11676
|
}
|
|
11527
11677
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
@@ -11529,7 +11679,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11529
11679
|
const anchor2 = next(activeBranch);
|
|
11530
11680
|
const mountFallback = () => {
|
|
11531
11681
|
suspense.isFallbackMountPending = false;
|
|
11532
|
-
if (!suspense.isInFallback) {
|
|
11682
|
+
if (suspense.isUnmounted || !suspense.isInFallback) {
|
|
11533
11683
|
return;
|
|
11534
11684
|
}
|
|
11535
11685
|
const latestFallback = suspense.vnode.ssFallback;
|
|
@@ -11581,19 +11731,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11581
11731
|
suspense.deps++;
|
|
11582
11732
|
}
|
|
11583
11733
|
const hydratedEl = instance.vnode.el;
|
|
11584
|
-
|
|
11585
|
-
handleError(err, instance, 0);
|
|
11586
|
-
}).then((asyncSetupResult) => {
|
|
11587
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11588
|
-
return;
|
|
11589
|
-
}
|
|
11590
|
-
unsetCurrentInstance();
|
|
11591
|
-
if (!instance.scope.active) {
|
|
11592
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11593
|
-
suspense.resolve();
|
|
11594
|
-
}
|
|
11595
|
-
return;
|
|
11596
|
-
}
|
|
11734
|
+
const render = (asyncSetupResult) => {
|
|
11597
11735
|
instance.asyncResolved = true;
|
|
11598
11736
|
const { vnode: vnode2 } = instance;
|
|
11599
11737
|
{
|
|
@@ -11626,13 +11764,57 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11626
11764
|
{
|
|
11627
11765
|
popWarningContext();
|
|
11628
11766
|
}
|
|
11629
|
-
|
|
11767
|
+
};
|
|
11768
|
+
instance.asyncDep.catch((err) => {
|
|
11769
|
+
handleError(err, instance, 0, false, true);
|
|
11770
|
+
return () => null;
|
|
11771
|
+
}).then((asyncSetupResult) => {
|
|
11772
|
+
if (instance.isUnmounted || suspense.isUnmounted) {
|
|
11773
|
+
return;
|
|
11774
|
+
}
|
|
11775
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
11776
|
+
unsetCurrentInstance();
|
|
11777
|
+
if (!instance.scope.active) {
|
|
11778
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11779
|
+
suspense.resolve();
|
|
11780
|
+
}
|
|
11781
|
+
return;
|
|
11782
|
+
}
|
|
11783
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
11784
|
+
const job = () => {
|
|
11785
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
|
|
11786
|
+
return;
|
|
11787
|
+
}
|
|
11788
|
+
if (suspense.pendingBranch) {
|
|
11789
|
+
queueEffectWithSuspense(job, suspense);
|
|
11790
|
+
} else {
|
|
11791
|
+
render(asyncSetupResult);
|
|
11792
|
+
}
|
|
11793
|
+
};
|
|
11794
|
+
job.flags = 16 | 32;
|
|
11795
|
+
queueEffectWithSuspense(job, suspense);
|
|
11796
|
+
return;
|
|
11797
|
+
}
|
|
11798
|
+
render(asyncSetupResult);
|
|
11799
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11630
11800
|
suspense.resolve();
|
|
11631
11801
|
}
|
|
11632
11802
|
});
|
|
11633
11803
|
},
|
|
11634
11804
|
unmount(parentSuspense2, doRemove) {
|
|
11635
11805
|
suspense.isUnmounted = true;
|
|
11806
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11807
|
+
suspense.timeoutTimer = void 0;
|
|
11808
|
+
if (parentSuspenseId !== void 0) {
|
|
11809
|
+
const parent = suspense.parent;
|
|
11810
|
+
const pendingId = parentSuspenseId;
|
|
11811
|
+
parentSuspenseId = void 0;
|
|
11812
|
+
queuePostFlushCb(() => {
|
|
11813
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
|
|
11814
|
+
parent.resolve();
|
|
11815
|
+
}
|
|
11816
|
+
});
|
|
11817
|
+
}
|
|
11636
11818
|
if (suspense.activeBranch) {
|
|
11637
11819
|
unmount(
|
|
11638
11820
|
suspense.activeBranch,
|
|
@@ -11642,12 +11824,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11642
11824
|
);
|
|
11643
11825
|
}
|
|
11644
11826
|
if (suspense.pendingBranch) {
|
|
11645
|
-
unmount(
|
|
11646
|
-
|
|
11647
|
-
parentComponent,
|
|
11648
|
-
parentSuspense2,
|
|
11649
|
-
doRemove
|
|
11650
|
-
);
|
|
11827
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
11828
|
+
discardEffects(suspense);
|
|
11651
11829
|
}
|
|
11652
11830
|
}
|
|
11653
11831
|
};
|
|
@@ -11717,6 +11895,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11717
11895
|
}
|
|
11718
11896
|
return s;
|
|
11719
11897
|
}
|
|
11898
|
+
function discardEffects(suspense) {
|
|
11899
|
+
const { effects } = suspense;
|
|
11900
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11901
|
+
const effect = effects[i];
|
|
11902
|
+
if (effect.flags & 16) {
|
|
11903
|
+
queuePostFlushCb(effect);
|
|
11904
|
+
}
|
|
11905
|
+
}
|
|
11906
|
+
effects.length = 0;
|
|
11907
|
+
}
|
|
11720
11908
|
function queueEffectWithSuspense(fn, suspense) {
|
|
11721
11909
|
if (suspense && suspense.pendingBranch) {
|
|
11722
11910
|
if (isArray(fn)) {
|
|
@@ -12032,7 +12220,8 @@ Component that was made reactive: `,
|
|
|
12032
12220
|
}
|
|
12033
12221
|
function guardReactiveProps(props) {
|
|
12034
12222
|
if (!props) return null;
|
|
12035
|
-
|
|
12223
|
+
if (isProxy(props)) return extend({}, props);
|
|
12224
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
12036
12225
|
}
|
|
12037
12226
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
12038
12227
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -12214,7 +12403,7 @@ Component that was made reactive: `,
|
|
|
12214
12403
|
]);
|
|
12215
12404
|
}
|
|
12216
12405
|
|
|
12217
|
-
const emptyAppContext = createAppContext();
|
|
12406
|
+
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
12218
12407
|
let uid = 0;
|
|
12219
12408
|
function getNextUid() {
|
|
12220
12409
|
return uid;
|
|
@@ -12415,7 +12604,8 @@ Component that was made reactive: `,
|
|
|
12415
12604
|
setInSSRSetupState(false);
|
|
12416
12605
|
}
|
|
12417
12606
|
}).catch((e) => {
|
|
12418
|
-
handleError(e, instance, 0);
|
|
12607
|
+
handleError(e, instance, 0, void 0, true);
|
|
12608
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
12419
12609
|
});
|
|
12420
12610
|
} else {
|
|
12421
12611
|
instance.asyncDep = setupResult;
|
|
@@ -12533,11 +12723,12 @@ Component that was made reactive: `,
|
|
|
12533
12723
|
}
|
|
12534
12724
|
}
|
|
12535
12725
|
}
|
|
12726
|
+
const rawAttrsKey = /* @__PURE__ */ Symbol();
|
|
12536
12727
|
const attrsProxyHandlers = {
|
|
12537
12728
|
get(target, key) {
|
|
12538
12729
|
markAttrsAccessed();
|
|
12539
12730
|
track(target, "get", "");
|
|
12540
|
-
return target[key];
|
|
12731
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12541
12732
|
},
|
|
12542
12733
|
set() {
|
|
12543
12734
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -12889,7 +13080,7 @@ Component that was made reactive: `,
|
|
|
12889
13080
|
return true;
|
|
12890
13081
|
}
|
|
12891
13082
|
|
|
12892
|
-
const version = "3.5.
|
|
13083
|
+
const version = "3.5.45";
|
|
12893
13084
|
const warn = warn$1 ;
|
|
12894
13085
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12895
13086
|
const devtools = devtools$1 ;
|
|
@@ -14760,18 +14951,18 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14760
14951
|
},
|
|
14761
14952
|
// set value in mounted & updated because <select> relies on its children
|
|
14762
14953
|
// <option>s.
|
|
14763
|
-
mounted(el, { value }) {
|
|
14764
|
-
setSelected(el, value);
|
|
14954
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
14955
|
+
setSelected(el, value, number);
|
|
14765
14956
|
},
|
|
14766
14957
|
beforeUpdate(el, { value }, vnode) {
|
|
14767
14958
|
el._modelValue = value;
|
|
14768
14959
|
el[assignKey] = getModelAssigner(vnode);
|
|
14769
14960
|
},
|
|
14770
|
-
updated(el, { value }) {
|
|
14961
|
+
updated(el, { value, modifiers: { number } }) {
|
|
14771
14962
|
const pending = el._pendingValue;
|
|
14772
14963
|
el._pendingValue = void 0;
|
|
14773
14964
|
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14774
|
-
setSelected(el, value);
|
|
14965
|
+
setSelected(el, value, number);
|
|
14775
14966
|
}
|
|
14776
14967
|
}
|
|
14777
14968
|
};
|
|
@@ -14787,7 +14978,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14787
14978
|
}
|
|
14788
14979
|
return false;
|
|
14789
14980
|
}
|
|
14790
|
-
function setSelected(el, value) {
|
|
14981
|
+
function setSelected(el, value, number = false) {
|
|
14791
14982
|
const isMultiple = el.multiple;
|
|
14792
14983
|
const isArrayValue = isArray(value);
|
|
14793
14984
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -14808,7 +14999,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14808
14999
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
14809
15000
|
}
|
|
14810
15001
|
} else {
|
|
14811
|
-
option.selected = value.has(optionValue);
|
|
15002
|
+
option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
14812
15003
|
}
|
|
14813
15004
|
} else if (looseEqual(getValue(option), value)) {
|
|
14814
15005
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|