@vue/compat 3.5.39 → 3.5.41
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/vue.cjs.js +204 -70
- package/dist/vue.cjs.prod.js +172 -68
- package/dist/vue.esm-browser.js +200 -69
- package/dist/vue.esm-browser.prod.js +9 -8
- package/dist/vue.esm-bundler.js +200 -69
- package/dist/vue.global.js +200 -69
- package/dist/vue.global.prod.js +9 -8
- package/dist/vue.runtime.esm-browser.js +143 -54
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +143 -54
- package/dist/vue.runtime.global.js +143 -54
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.41
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -270,7 +270,7 @@ var Vue = (function () {
|
|
|
270
270
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
271
271
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
272
272
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
273
|
-
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,
|
|
273
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
274
274
|
);
|
|
275
275
|
function includeBooleanAttr(value) {
|
|
276
276
|
return !!value || value === "";
|
|
@@ -452,8 +452,9 @@ var Vue = (function () {
|
|
|
452
452
|
this._isPaused = true;
|
|
453
453
|
let i, l;
|
|
454
454
|
if (this.scopes) {
|
|
455
|
-
|
|
456
|
-
|
|
455
|
+
const scopes = this.scopes.slice();
|
|
456
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
457
|
+
scopes[i].pause();
|
|
457
458
|
}
|
|
458
459
|
}
|
|
459
460
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
@@ -470,12 +471,14 @@ var Vue = (function () {
|
|
|
470
471
|
this._isPaused = false;
|
|
471
472
|
let i, l;
|
|
472
473
|
if (this.scopes) {
|
|
473
|
-
|
|
474
|
-
|
|
474
|
+
const scopes = this.scopes.slice();
|
|
475
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
476
|
+
scopes[i].resume();
|
|
475
477
|
}
|
|
476
478
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
+
const effects = this.effects.slice();
|
|
480
|
+
for (i = 0, l = effects.length; i < l; i++) {
|
|
481
|
+
effects[i].resume();
|
|
479
482
|
}
|
|
480
483
|
}
|
|
481
484
|
}
|
|
@@ -537,8 +540,9 @@ var Vue = (function () {
|
|
|
537
540
|
}
|
|
538
541
|
this.cleanups.length = 0;
|
|
539
542
|
if (this.scopes) {
|
|
540
|
-
|
|
541
|
-
|
|
543
|
+
const scopes = this.scopes.slice();
|
|
544
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
545
|
+
scopes[i].stop(true);
|
|
542
546
|
}
|
|
543
547
|
this.scopes.length = 0;
|
|
544
548
|
}
|
|
@@ -2669,7 +2673,9 @@ var Vue = (function () {
|
|
|
2669
2673
|
cb.flags |= 1;
|
|
2670
2674
|
}
|
|
2671
2675
|
} else {
|
|
2672
|
-
|
|
2676
|
+
for (let i = 0; i < cb.length; i++) {
|
|
2677
|
+
pendingPostFlushCbs.push(cb[i]);
|
|
2678
|
+
}
|
|
2673
2679
|
}
|
|
2674
2680
|
queueFlush();
|
|
2675
2681
|
}
|
|
@@ -2705,7 +2711,9 @@ var Vue = (function () {
|
|
|
2705
2711
|
);
|
|
2706
2712
|
pendingPostFlushCbs.length = 0;
|
|
2707
2713
|
if (activePostFlushCbs) {
|
|
2708
|
-
|
|
2714
|
+
for (let i = 0; i < deduped.length; i++) {
|
|
2715
|
+
activePostFlushCbs.push(deduped[i]);
|
|
2716
|
+
}
|
|
2709
2717
|
return;
|
|
2710
2718
|
}
|
|
2711
2719
|
activePostFlushCbs = deduped;
|
|
@@ -3460,10 +3468,12 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3460
3468
|
setBlockTracking(-1);
|
|
3461
3469
|
}
|
|
3462
3470
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
3471
|
+
const prevStackSize = blockStack.length;
|
|
3463
3472
|
let res;
|
|
3464
3473
|
try {
|
|
3465
3474
|
res = fn(...args);
|
|
3466
3475
|
} finally {
|
|
3476
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
3467
3477
|
setCurrentRenderingInstance(prevInstance);
|
|
3468
3478
|
if (renderFnWithContext._d) {
|
|
3469
3479
|
setBlockTracking(1);
|
|
@@ -4436,7 +4446,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4436
4446
|
function setTransitionHooks(vnode, hooks) {
|
|
4437
4447
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4438
4448
|
vnode.transition = hooks;
|
|
4439
|
-
|
|
4449
|
+
const subTree = vnode.component.subTree;
|
|
4450
|
+
setTransitionHooks(
|
|
4451
|
+
isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
|
|
4452
|
+
hooks
|
|
4453
|
+
);
|
|
4440
4454
|
} else if (vnode.shapeFlag & 128) {
|
|
4441
4455
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4442
4456
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4596,12 +4610,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4596
4610
|
}
|
|
4597
4611
|
}
|
|
4598
4612
|
if (isFunction(ref)) {
|
|
4599
|
-
|
|
4600
|
-
try {
|
|
4601
|
-
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4602
|
-
} finally {
|
|
4603
|
-
resetTracking();
|
|
4604
|
-
}
|
|
4613
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4605
4614
|
} else {
|
|
4606
4615
|
const _isString = isString(ref);
|
|
4607
4616
|
const _isRef = isRef(ref);
|
|
@@ -4972,6 +4981,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4972
4981
|
if (props) {
|
|
4973
4982
|
{
|
|
4974
4983
|
const isCustomElement = el.tagName.includes("-");
|
|
4984
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4975
4985
|
for (const key in props) {
|
|
4976
4986
|
if (// #11189 skip if this node has directives that have created hooks
|
|
4977
4987
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4980,7 +4990,10 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4980
4990
|
}
|
|
4981
4991
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4982
4992
|
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4983
|
-
|
|
4993
|
+
if (isUnchangedResourceProp(el, key, props[key])) {
|
|
4994
|
+
continue;
|
|
4995
|
+
}
|
|
4996
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4984
4997
|
}
|
|
4985
4998
|
}
|
|
4986
4999
|
}
|
|
@@ -5162,6 +5175,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5162
5175
|
};
|
|
5163
5176
|
return [hydrate, hydrateNode];
|
|
5164
5177
|
}
|
|
5178
|
+
const resourceProps = /* @__PURE__ */ new Set(["src", "srcset", "href", "poster"]);
|
|
5179
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
5180
|
+
if (!resourceProps.has(key)) {
|
|
5181
|
+
return false;
|
|
5182
|
+
}
|
|
5183
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
5184
|
+
}
|
|
5165
5185
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5166
5186
|
let mismatchType;
|
|
5167
5187
|
let mismatchKey;
|
|
@@ -5199,7 +5219,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5199
5219
|
mismatchKey = "style";
|
|
5200
5220
|
}
|
|
5201
5221
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
5202
|
-
if (
|
|
5222
|
+
if (key === "hidden") {
|
|
5223
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
5224
|
+
expected = normalizeHiddenValue(clientValue);
|
|
5225
|
+
} else if (isBooleanAttr(key)) {
|
|
5203
5226
|
actual = el.hasAttribute(key);
|
|
5204
5227
|
expected = includeBooleanAttr(clientValue);
|
|
5205
5228
|
} else if (clientValue == null) {
|
|
@@ -5235,6 +5258,15 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5235
5258
|
}
|
|
5236
5259
|
return false;
|
|
5237
5260
|
}
|
|
5261
|
+
function normalizeHiddenValue(value) {
|
|
5262
|
+
if (!isRenderableAttrValue(value)) {
|
|
5263
|
+
return false;
|
|
5264
|
+
}
|
|
5265
|
+
if (isString(value)) {
|
|
5266
|
+
return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
5267
|
+
}
|
|
5268
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
5269
|
+
}
|
|
5238
5270
|
function toClassSet(str) {
|
|
5239
5271
|
return new Set(str.trim().split(/\s+/));
|
|
5240
5272
|
}
|
|
@@ -5483,6 +5515,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5483
5515
|
name: "AsyncComponentWrapper",
|
|
5484
5516
|
__asyncLoader: load,
|
|
5485
5517
|
__asyncHydrate(el, instance, hydrate) {
|
|
5518
|
+
const wasConnected = el.isConnected;
|
|
5486
5519
|
let patched = false;
|
|
5487
5520
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5488
5521
|
const performHydrate = () => {
|
|
@@ -5494,6 +5527,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5494
5527
|
}
|
|
5495
5528
|
return;
|
|
5496
5529
|
}
|
|
5530
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
5497
5531
|
hydrate();
|
|
5498
5532
|
};
|
|
5499
5533
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -6337,14 +6371,16 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6337
6371
|
return slots;
|
|
6338
6372
|
}
|
|
6339
6373
|
|
|
6340
|
-
function renderSlot(slots, name, props
|
|
6374
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
6375
|
+
if (props == null) props = {};
|
|
6341
6376
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
6342
|
-
const
|
|
6343
|
-
|
|
6377
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
6378
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
6379
|
+
if (name !== "default") slotProps.name = name;
|
|
6344
6380
|
return openBlock(), createBlock(
|
|
6345
6381
|
Fragment,
|
|
6346
6382
|
null,
|
|
6347
|
-
[createVNode("slot",
|
|
6383
|
+
[createVNode("slot", slotProps, fallback && fallback())],
|
|
6348
6384
|
hasProps ? -2 : 64
|
|
6349
6385
|
);
|
|
6350
6386
|
}
|
|
@@ -6358,26 +6394,34 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6358
6394
|
if (slot && slot._c) {
|
|
6359
6395
|
slot._d = false;
|
|
6360
6396
|
}
|
|
6397
|
+
const prevStackSize = blockStack.length;
|
|
6361
6398
|
openBlock();
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6399
|
+
let rendered;
|
|
6400
|
+
try {
|
|
6401
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6402
|
+
const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
|
|
6403
|
+
// key attached in the `createSlots` helper, respect that
|
|
6404
|
+
validSlotContent && validSlotContent.key;
|
|
6405
|
+
rendered = createBlock(
|
|
6406
|
+
Fragment,
|
|
6407
|
+
{
|
|
6408
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6409
|
+
(!validSlotContent && fallback ? "_fb" : "")
|
|
6410
|
+
},
|
|
6411
|
+
validSlotContent || (fallback ? fallback() : []),
|
|
6412
|
+
validSlotContent && slots._ === 1 ? 64 : -2
|
|
6413
|
+
);
|
|
6414
|
+
} catch (err) {
|
|
6415
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
6416
|
+
throw err;
|
|
6417
|
+
} finally {
|
|
6418
|
+
if (slot && slot._c) {
|
|
6419
|
+
slot._d = true;
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6375
6422
|
if (!noSlotted && rendered.scopeId) {
|
|
6376
6423
|
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
6377
6424
|
}
|
|
6378
|
-
if (slot && slot._c) {
|
|
6379
|
-
slot._d = true;
|
|
6380
|
-
}
|
|
6381
6425
|
return rendered;
|
|
6382
6426
|
}
|
|
6383
6427
|
function ensureValidVNode(vnodes) {
|
|
@@ -7552,7 +7596,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7552
7596
|
return vm;
|
|
7553
7597
|
}
|
|
7554
7598
|
}
|
|
7555
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7599
|
+
Vue.version = `2.6.14-compat:${"3.5.41"}`;
|
|
7556
7600
|
Vue.config = singletonApp.config;
|
|
7557
7601
|
Vue.use = (plugin, ...options) => {
|
|
7558
7602
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8574,12 +8618,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8574
8618
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
8575
8619
|
}
|
|
8576
8620
|
if (vnode.transition) {
|
|
8577
|
-
|
|
8621
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
8622
|
+
if (!isElementRoot(child)) {
|
|
8578
8623
|
warn$1(
|
|
8579
8624
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8580
8625
|
);
|
|
8581
8626
|
}
|
|
8582
|
-
setTransitionHooks(
|
|
8627
|
+
setTransitionHooks(child, vnode.transition);
|
|
8583
8628
|
}
|
|
8584
8629
|
if (setRoot) {
|
|
8585
8630
|
setRoot(root);
|
|
@@ -11333,7 +11378,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11333
11378
|
let hasUnresolvedAncestor = false;
|
|
11334
11379
|
while (parent) {
|
|
11335
11380
|
if (parent.pendingBranch) {
|
|
11336
|
-
|
|
11381
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11382
|
+
parent.effects.push(effects[i]);
|
|
11383
|
+
}
|
|
11337
11384
|
hasUnresolvedAncestor = true;
|
|
11338
11385
|
break;
|
|
11339
11386
|
}
|
|
@@ -11755,6 +11802,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11755
11802
|
if (vnode.key !== vnode.key) {
|
|
11756
11803
|
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
11757
11804
|
}
|
|
11805
|
+
if (props && vnode.shapeFlag & 1) {
|
|
11806
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
11807
|
+
if (overwritingProp && hasContentChildren(vnode.children)) {
|
|
11808
|
+
warn$1(
|
|
11809
|
+
`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
|
|
11810
|
+
);
|
|
11811
|
+
}
|
|
11812
|
+
}
|
|
11758
11813
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
11759
11814
|
!isBlockNode && // has current parent block
|
|
11760
11815
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -11772,6 +11827,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11772
11827
|
}
|
|
11773
11828
|
return vnode;
|
|
11774
11829
|
}
|
|
11830
|
+
function hasContentChildren(children) {
|
|
11831
|
+
if (isString(children)) return children !== "";
|
|
11832
|
+
if (isArray(children)) return children.length > 0;
|
|
11833
|
+
return false;
|
|
11834
|
+
}
|
|
11775
11835
|
const createVNode = createVNodeWithArgsTransform ;
|
|
11776
11836
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
11777
11837
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -12214,7 +12274,12 @@ Component that was made reactive: `,
|
|
|
12214
12274
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
12215
12275
|
if (isSSR) {
|
|
12216
12276
|
return setupResult.then((resolvedResult) => {
|
|
12217
|
-
|
|
12277
|
+
setInSSRSetupState(true);
|
|
12278
|
+
try {
|
|
12279
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
12280
|
+
} finally {
|
|
12281
|
+
setInSSRSetupState(false);
|
|
12282
|
+
}
|
|
12218
12283
|
}).catch((e) => {
|
|
12219
12284
|
handleError(e, instance, 0);
|
|
12220
12285
|
});
|
|
@@ -12690,7 +12755,7 @@ Component that was made reactive: `,
|
|
|
12690
12755
|
return true;
|
|
12691
12756
|
}
|
|
12692
12757
|
|
|
12693
|
-
const version = "3.5.
|
|
12758
|
+
const version = "3.5.41";
|
|
12694
12759
|
const warn = warn$1 ;
|
|
12695
12760
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12696
12761
|
const devtools = devtools$1 ;
|
|
@@ -13729,7 +13794,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13729
13794
|
if (parent && parent._pendingResolve) {
|
|
13730
13795
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13731
13796
|
this._pendingResolve = void 0;
|
|
13732
|
-
this.
|
|
13797
|
+
if (this.isConnected) {
|
|
13798
|
+
return this._resolveDef();
|
|
13799
|
+
}
|
|
13733
13800
|
});
|
|
13734
13801
|
} else {
|
|
13735
13802
|
this._resolveDef();
|
|
@@ -13779,7 +13846,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13779
13846
|
*/
|
|
13780
13847
|
_resolveDef() {
|
|
13781
13848
|
if (this._pendingResolve) {
|
|
13782
|
-
return;
|
|
13849
|
+
return this._pendingResolve;
|
|
13783
13850
|
}
|
|
13784
13851
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13785
13852
|
this._setAttr(this.attributes[i].name);
|
|
@@ -13819,6 +13886,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13819
13886
|
def.configureApp = this._def.configureApp;
|
|
13820
13887
|
resolve(this._def = def, true);
|
|
13821
13888
|
});
|
|
13889
|
+
return this._pendingResolve;
|
|
13822
13890
|
} else {
|
|
13823
13891
|
resolve(this._def);
|
|
13824
13892
|
}
|
|
@@ -13856,6 +13924,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13856
13924
|
}
|
|
13857
13925
|
}
|
|
13858
13926
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
13927
|
+
if (key in Object.getPrototypeOf(this)) {
|
|
13928
|
+
warn(
|
|
13929
|
+
`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`
|
|
13930
|
+
);
|
|
13931
|
+
}
|
|
13859
13932
|
Object.defineProperty(this, key, {
|
|
13860
13933
|
get() {
|
|
13861
13934
|
return this._getProp(key);
|
|
@@ -14337,6 +14410,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14337
14410
|
}
|
|
14338
14411
|
}
|
|
14339
14412
|
const assignKey = /* @__PURE__ */ Symbol("_assign");
|
|
14413
|
+
const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
|
|
14340
14414
|
function castValue(value, trim, number) {
|
|
14341
14415
|
if (trim) value = value.trim();
|
|
14342
14416
|
if (number) value = looseToNumber(value);
|
|
@@ -14344,6 +14418,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14344
14418
|
}
|
|
14345
14419
|
const vModelText = {
|
|
14346
14420
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
14421
|
+
if (el.parentNode) {
|
|
14422
|
+
if (el.type === "text") {
|
|
14423
|
+
el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
14424
|
+
} else if (el.type === "textarea") {
|
|
14425
|
+
el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
14426
|
+
}
|
|
14427
|
+
}
|
|
14347
14428
|
el[assignKey] = getModelAssigner(vnode);
|
|
14348
14429
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
14349
14430
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
@@ -14362,8 +14443,15 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14362
14443
|
}
|
|
14363
14444
|
},
|
|
14364
14445
|
// set value on mounted so it's after min/max for type="range"
|
|
14365
|
-
mounted(el, { value }) {
|
|
14366
|
-
|
|
14446
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
14447
|
+
const newValue = value == null ? "" : value;
|
|
14448
|
+
const initialValue = el[initialValueKey];
|
|
14449
|
+
delete el[initialValueKey];
|
|
14450
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
|
|
14451
|
+
el[assignKey](castValue(el.value, trim, number));
|
|
14452
|
+
} else {
|
|
14453
|
+
el.value = newValue;
|
|
14454
|
+
}
|
|
14367
14455
|
},
|
|
14368
14456
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
14369
14457
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -14459,13 +14547,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14459
14547
|
// <select multiple> value need to be deep traversed
|
|
14460
14548
|
deep: true,
|
|
14461
14549
|
created(el, { value, modifiers: { number } }, vnode) {
|
|
14462
|
-
|
|
14550
|
+
el._modelValue = value;
|
|
14463
14551
|
addEventListener(el, "change", () => {
|
|
14464
14552
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
14465
14553
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
14466
14554
|
);
|
|
14467
14555
|
el[assignKey](
|
|
14468
|
-
el.multiple ?
|
|
14556
|
+
el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
14469
14557
|
);
|
|
14470
14558
|
el._assigning = true;
|
|
14471
14559
|
nextTick(() => {
|
|
@@ -14479,7 +14567,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14479
14567
|
mounted(el, { value }) {
|
|
14480
14568
|
setSelected(el, value);
|
|
14481
14569
|
},
|
|
14482
|
-
beforeUpdate(el,
|
|
14570
|
+
beforeUpdate(el, { value }, vnode) {
|
|
14571
|
+
el._modelValue = value;
|
|
14483
14572
|
el[assignKey] = getModelAssigner(vnode);
|
|
14484
14573
|
},
|
|
14485
14574
|
updated(el, { value }) {
|
|
@@ -16377,6 +16466,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16377
16466
|
return [props, callPath];
|
|
16378
16467
|
}
|
|
16379
16468
|
function injectProp(node, prop, context) {
|
|
16469
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) {
|
|
16470
|
+
return;
|
|
16471
|
+
}
|
|
16380
16472
|
let propsWithInjection;
|
|
16381
16473
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
16382
16474
|
let callPath = [];
|
|
@@ -16434,6 +16526,24 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16434
16526
|
}
|
|
16435
16527
|
}
|
|
16436
16528
|
}
|
|
16529
|
+
function injectSlotKey(node, prop) {
|
|
16530
|
+
var _a, _b, _c;
|
|
16531
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") {
|
|
16532
|
+
return false;
|
|
16533
|
+
}
|
|
16534
|
+
const props = node.arguments[2];
|
|
16535
|
+
if (props && !isString(props)) {
|
|
16536
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
16537
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) {
|
|
16538
|
+
return true;
|
|
16539
|
+
}
|
|
16540
|
+
}
|
|
16541
|
+
(_a = node.arguments)[2] || (_a[2] = "{}");
|
|
16542
|
+
(_b = node.arguments)[3] || (_b[3] = "undefined");
|
|
16543
|
+
(_c = node.arguments)[4] || (_c[4] = "undefined");
|
|
16544
|
+
node.arguments[5] = prop.value;
|
|
16545
|
+
return true;
|
|
16546
|
+
}
|
|
16437
16547
|
function hasProp(prop, props) {
|
|
16438
16548
|
let result = false;
|
|
16439
16549
|
if (prop.key.type === 4) {
|
|
@@ -18700,6 +18810,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18700
18810
|
node.loc
|
|
18701
18811
|
);
|
|
18702
18812
|
return () => {
|
|
18813
|
+
var _a;
|
|
18703
18814
|
let childBlock;
|
|
18704
18815
|
const { children } = forNode;
|
|
18705
18816
|
if (isTemplate) {
|
|
@@ -18743,7 +18854,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18743
18854
|
if (isTemplate && keyProperty) {
|
|
18744
18855
|
injectProp(childBlock, keyProperty, context);
|
|
18745
18856
|
}
|
|
18746
|
-
|
|
18857
|
+
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
18858
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
18747
18859
|
if (childBlock.isBlock) {
|
|
18748
18860
|
removeHelper(OPEN_BLOCK);
|
|
18749
18861
|
removeHelper(
|
|
@@ -18755,12 +18867,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18755
18867
|
);
|
|
18756
18868
|
}
|
|
18757
18869
|
}
|
|
18758
|
-
childBlock.isBlock =
|
|
18870
|
+
childBlock.isBlock = shouldUseBlock;
|
|
18759
18871
|
if (childBlock.isBlock) {
|
|
18760
18872
|
helper(OPEN_BLOCK);
|
|
18761
18873
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
18762
18874
|
} else {
|
|
18763
18875
|
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
18876
|
+
if (childBlock.needsPatch) {
|
|
18877
|
+
childBlock.patchFlag = ((_a = childBlock.patchFlag) != null ? _a : 0) | 512;
|
|
18878
|
+
}
|
|
18764
18879
|
}
|
|
18765
18880
|
}
|
|
18766
18881
|
if (memo) {
|
|
@@ -19139,6 +19254,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19139
19254
|
let vnodeDynamicProps;
|
|
19140
19255
|
let dynamicPropNames;
|
|
19141
19256
|
let vnodeDirectives;
|
|
19257
|
+
let needsPatch = false;
|
|
19258
|
+
let isBlockRequired = false;
|
|
19142
19259
|
let shouldUseBlock = (
|
|
19143
19260
|
// dynamic component may resolve to plain elements
|
|
19144
19261
|
isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
|
|
@@ -19158,6 +19275,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19158
19275
|
vnodeProps = propsBuildResult.props;
|
|
19159
19276
|
patchFlag = propsBuildResult.patchFlag;
|
|
19160
19277
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
19278
|
+
needsPatch = propsBuildResult.needsPatch;
|
|
19279
|
+
isBlockRequired = propsBuildResult.isBlockRequired;
|
|
19161
19280
|
const directives = propsBuildResult.directives;
|
|
19162
19281
|
vnodeDirectives = directives && directives.length ? createArrayExpression(
|
|
19163
19282
|
directives.map((dir) => buildDirectiveArgs(dir, context))
|
|
@@ -19208,7 +19327,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19208
19327
|
if (dynamicPropNames && dynamicPropNames.length) {
|
|
19209
19328
|
vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
19210
19329
|
}
|
|
19211
|
-
node.codegenNode = createVNodeCall(
|
|
19330
|
+
const vnodeCall = node.codegenNode = createVNodeCall(
|
|
19212
19331
|
context,
|
|
19213
19332
|
vnodeTag,
|
|
19214
19333
|
vnodeProps,
|
|
@@ -19221,6 +19340,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19221
19340
|
isComponent,
|
|
19222
19341
|
node.loc
|
|
19223
19342
|
);
|
|
19343
|
+
needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
|
|
19344
|
+
if (needsPatch) {
|
|
19345
|
+
vnodeCall.needsPatch = true;
|
|
19346
|
+
}
|
|
19347
|
+
if (isBlockRequired) {
|
|
19348
|
+
vnodeCall.isBlockRequired = true;
|
|
19349
|
+
}
|
|
19224
19350
|
};
|
|
19225
19351
|
};
|
|
19226
19352
|
function resolveComponentType(node, context, ssr = false) {
|
|
@@ -19272,6 +19398,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19272
19398
|
const runtimeDirectives = [];
|
|
19273
19399
|
const hasChildren = children.length > 0;
|
|
19274
19400
|
let shouldUseBlock = false;
|
|
19401
|
+
let isBlockRequired = false;
|
|
19275
19402
|
let patchFlag = 0;
|
|
19276
19403
|
let hasRef = false;
|
|
19277
19404
|
let hasClassBinding = false;
|
|
@@ -19313,19 +19440,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19313
19440
|
if (isEventHandler && isReservedProp(name)) {
|
|
19314
19441
|
hasVnodeHook = true;
|
|
19315
19442
|
}
|
|
19443
|
+
if (name === "ref") {
|
|
19444
|
+
hasRef = true;
|
|
19445
|
+
}
|
|
19316
19446
|
if (isEventHandler && value.type === 14) {
|
|
19317
19447
|
value = value.arguments[0];
|
|
19318
19448
|
}
|
|
19319
19449
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
19320
19450
|
return;
|
|
19321
19451
|
}
|
|
19322
|
-
if (name === "
|
|
19323
|
-
hasRef = true;
|
|
19324
|
-
} else if (name === "class") {
|
|
19452
|
+
if (name === "class") {
|
|
19325
19453
|
hasClassBinding = true;
|
|
19326
19454
|
} else if (name === "style") {
|
|
19327
19455
|
hasStyleBinding = true;
|
|
19328
|
-
} else if (name !== "key" && !dynamicPropNames.includes(name)) {
|
|
19456
|
+
} else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) {
|
|
19329
19457
|
dynamicPropNames.push(name);
|
|
19330
19458
|
}
|
|
19331
19459
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
|
|
@@ -19384,13 +19512,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19384
19512
|
if (isVOn && ssr) {
|
|
19385
19513
|
continue;
|
|
19386
19514
|
}
|
|
19387
|
-
if (
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
|
|
19392
|
-
) {
|
|
19515
|
+
if (isVBind && isStaticArgOf(arg, "key")) {
|
|
19516
|
+
shouldUseBlock = true;
|
|
19517
|
+
}
|
|
19518
|
+
if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
|
|
19393
19519
|
shouldUseBlock = true;
|
|
19520
|
+
isBlockRequired = true;
|
|
19394
19521
|
}
|
|
19395
19522
|
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
19396
19523
|
pushRefVForMarker();
|
|
@@ -19473,6 +19600,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19473
19600
|
runtimeDirectives.push(prop);
|
|
19474
19601
|
if (hasChildren) {
|
|
19475
19602
|
shouldUseBlock = true;
|
|
19603
|
+
isBlockRequired = true;
|
|
19476
19604
|
}
|
|
19477
19605
|
}
|
|
19478
19606
|
}
|
|
@@ -19511,7 +19639,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19511
19639
|
patchFlag |= 32;
|
|
19512
19640
|
}
|
|
19513
19641
|
}
|
|
19514
|
-
|
|
19642
|
+
const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
|
|
19643
|
+
if (!shouldUseBlock && needsPatch) {
|
|
19515
19644
|
patchFlag |= 512;
|
|
19516
19645
|
}
|
|
19517
19646
|
if (!context.inSSR && propsExpression) {
|
|
@@ -19577,7 +19706,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19577
19706
|
directives: runtimeDirectives,
|
|
19578
19707
|
patchFlag,
|
|
19579
19708
|
dynamicPropNames,
|
|
19580
|
-
shouldUseBlock
|
|
19709
|
+
shouldUseBlock,
|
|
19710
|
+
needsPatch,
|
|
19711
|
+
isBlockRequired
|
|
19581
19712
|
};
|
|
19582
19713
|
}
|
|
19583
19714
|
function dedupeProperties(properties) {
|