vue 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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +199 -68
- package/dist/vue.esm-browser.prod.js +9 -8
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +199 -68
- package/dist/vue.global.prod.js +10 -9
- package/dist/vue.runtime.esm-browser.js +142 -53
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +142 -53
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue 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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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;
|
|
@@ -3035,10 +3043,12 @@ var Vue = (function (exports) {
|
|
|
3035
3043
|
setBlockTracking(-1);
|
|
3036
3044
|
}
|
|
3037
3045
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
3046
|
+
const prevStackSize = blockStack.length;
|
|
3038
3047
|
let res;
|
|
3039
3048
|
try {
|
|
3040
3049
|
res = fn(...args);
|
|
3041
3050
|
} finally {
|
|
3051
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
3042
3052
|
setCurrentRenderingInstance(prevInstance);
|
|
3043
3053
|
if (renderFnWithContext._d) {
|
|
3044
3054
|
setBlockTracking(1);
|
|
@@ -3964,7 +3974,11 @@ var Vue = (function (exports) {
|
|
|
3964
3974
|
function setTransitionHooks(vnode, hooks) {
|
|
3965
3975
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3966
3976
|
vnode.transition = hooks;
|
|
3967
|
-
|
|
3977
|
+
const subTree = vnode.component.subTree;
|
|
3978
|
+
setTransitionHooks(
|
|
3979
|
+
isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
|
|
3980
|
+
hooks
|
|
3981
|
+
);
|
|
3968
3982
|
} else if (vnode.shapeFlag & 128) {
|
|
3969
3983
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3970
3984
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4124,12 +4138,7 @@ var Vue = (function (exports) {
|
|
|
4124
4138
|
}
|
|
4125
4139
|
}
|
|
4126
4140
|
if (isFunction(ref)) {
|
|
4127
|
-
|
|
4128
|
-
try {
|
|
4129
|
-
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4130
|
-
} finally {
|
|
4131
|
-
resetTracking();
|
|
4132
|
-
}
|
|
4141
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4133
4142
|
} else {
|
|
4134
4143
|
const _isString = isString(ref);
|
|
4135
4144
|
const _isRef = isRef(ref);
|
|
@@ -4500,6 +4509,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4500
4509
|
if (props) {
|
|
4501
4510
|
{
|
|
4502
4511
|
const isCustomElement = el.tagName.includes("-");
|
|
4512
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4503
4513
|
for (const key in props) {
|
|
4504
4514
|
if (// #11189 skip if this node has directives that have created hooks
|
|
4505
4515
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4508,7 +4518,10 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4508
4518
|
}
|
|
4509
4519
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4510
4520
|
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4511
|
-
|
|
4521
|
+
if (isUnchangedResourceProp(el, key, props[key])) {
|
|
4522
|
+
continue;
|
|
4523
|
+
}
|
|
4524
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4512
4525
|
}
|
|
4513
4526
|
}
|
|
4514
4527
|
}
|
|
@@ -4690,6 +4703,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4690
4703
|
};
|
|
4691
4704
|
return [hydrate, hydrateNode];
|
|
4692
4705
|
}
|
|
4706
|
+
const resourceProps = /* @__PURE__ */ new Set(["src", "srcset", "href", "poster"]);
|
|
4707
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
4708
|
+
if (!resourceProps.has(key)) {
|
|
4709
|
+
return false;
|
|
4710
|
+
}
|
|
4711
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
4712
|
+
}
|
|
4693
4713
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
4694
4714
|
let mismatchType;
|
|
4695
4715
|
let mismatchKey;
|
|
@@ -4727,7 +4747,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4727
4747
|
mismatchKey = "style";
|
|
4728
4748
|
}
|
|
4729
4749
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
4730
|
-
if (
|
|
4750
|
+
if (key === "hidden") {
|
|
4751
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
4752
|
+
expected = normalizeHiddenValue(clientValue);
|
|
4753
|
+
} else if (isBooleanAttr(key)) {
|
|
4731
4754
|
actual = el.hasAttribute(key);
|
|
4732
4755
|
expected = includeBooleanAttr(clientValue);
|
|
4733
4756
|
} else if (clientValue == null) {
|
|
@@ -4763,6 +4786,15 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4763
4786
|
}
|
|
4764
4787
|
return false;
|
|
4765
4788
|
}
|
|
4789
|
+
function normalizeHiddenValue(value) {
|
|
4790
|
+
if (!isRenderableAttrValue(value)) {
|
|
4791
|
+
return false;
|
|
4792
|
+
}
|
|
4793
|
+
if (isString(value)) {
|
|
4794
|
+
return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
4795
|
+
}
|
|
4796
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
4797
|
+
}
|
|
4766
4798
|
function toClassSet(str) {
|
|
4767
4799
|
return new Set(str.trim().split(/\s+/));
|
|
4768
4800
|
}
|
|
@@ -5011,6 +5043,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5011
5043
|
name: "AsyncComponentWrapper",
|
|
5012
5044
|
__asyncLoader: load,
|
|
5013
5045
|
__asyncHydrate(el, instance, hydrate) {
|
|
5046
|
+
const wasConnected = el.isConnected;
|
|
5014
5047
|
let patched = false;
|
|
5015
5048
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5016
5049
|
const performHydrate = () => {
|
|
@@ -5022,6 +5055,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5022
5055
|
}
|
|
5023
5056
|
return;
|
|
5024
5057
|
}
|
|
5058
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
5025
5059
|
hydrate();
|
|
5026
5060
|
};
|
|
5027
5061
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5574,14 +5608,16 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5574
5608
|
return slots;
|
|
5575
5609
|
}
|
|
5576
5610
|
|
|
5577
|
-
function renderSlot(slots, name, props
|
|
5611
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5612
|
+
if (props == null) props = {};
|
|
5578
5613
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5579
|
-
const
|
|
5580
|
-
|
|
5614
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
5615
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
5616
|
+
if (name !== "default") slotProps.name = name;
|
|
5581
5617
|
return openBlock(), createBlock(
|
|
5582
5618
|
Fragment,
|
|
5583
5619
|
null,
|
|
5584
|
-
[createVNode("slot",
|
|
5620
|
+
[createVNode("slot", slotProps, fallback && fallback())],
|
|
5585
5621
|
hasProps ? -2 : 64
|
|
5586
5622
|
);
|
|
5587
5623
|
}
|
|
@@ -5595,26 +5631,34 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5595
5631
|
if (slot && slot._c) {
|
|
5596
5632
|
slot._d = false;
|
|
5597
5633
|
}
|
|
5634
|
+
const prevStackSize = blockStack.length;
|
|
5598
5635
|
openBlock();
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5636
|
+
let rendered;
|
|
5637
|
+
try {
|
|
5638
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5639
|
+
const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
|
|
5640
|
+
// key attached in the `createSlots` helper, respect that
|
|
5641
|
+
validSlotContent && validSlotContent.key;
|
|
5642
|
+
rendered = createBlock(
|
|
5643
|
+
Fragment,
|
|
5644
|
+
{
|
|
5645
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5646
|
+
(!validSlotContent && fallback ? "_fb" : "")
|
|
5647
|
+
},
|
|
5648
|
+
validSlotContent || (fallback ? fallback() : []),
|
|
5649
|
+
validSlotContent && slots._ === 1 ? 64 : -2
|
|
5650
|
+
);
|
|
5651
|
+
} catch (err) {
|
|
5652
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5653
|
+
throw err;
|
|
5654
|
+
} finally {
|
|
5655
|
+
if (slot && slot._c) {
|
|
5656
|
+
slot._d = true;
|
|
5657
|
+
}
|
|
5658
|
+
}
|
|
5612
5659
|
if (!noSlotted && rendered.scopeId) {
|
|
5613
5660
|
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
5614
5661
|
}
|
|
5615
|
-
if (slot && slot._c) {
|
|
5616
|
-
slot._d = true;
|
|
5617
|
-
}
|
|
5618
5662
|
return rendered;
|
|
5619
5663
|
}
|
|
5620
5664
|
function ensureValidVNode(vnodes) {
|
|
@@ -6986,12 +7030,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6986
7030
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
6987
7031
|
}
|
|
6988
7032
|
if (vnode.transition) {
|
|
6989
|
-
|
|
7033
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
7034
|
+
if (!isElementRoot(child)) {
|
|
6990
7035
|
warn$1(
|
|
6991
7036
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
6992
7037
|
);
|
|
6993
7038
|
}
|
|
6994
|
-
setTransitionHooks(
|
|
7039
|
+
setTransitionHooks(child, vnode.transition);
|
|
6995
7040
|
}
|
|
6996
7041
|
if (setRoot) {
|
|
6997
7042
|
setRoot(root);
|
|
@@ -9639,7 +9684,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9639
9684
|
let hasUnresolvedAncestor = false;
|
|
9640
9685
|
while (parent) {
|
|
9641
9686
|
if (parent.pendingBranch) {
|
|
9642
|
-
|
|
9687
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9688
|
+
parent.effects.push(effects[i]);
|
|
9689
|
+
}
|
|
9643
9690
|
hasUnresolvedAncestor = true;
|
|
9644
9691
|
break;
|
|
9645
9692
|
}
|
|
@@ -10004,6 +10051,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10004
10051
|
if (vnode.key !== vnode.key) {
|
|
10005
10052
|
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
10006
10053
|
}
|
|
10054
|
+
if (props && vnode.shapeFlag & 1) {
|
|
10055
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
10056
|
+
if (overwritingProp && hasContentChildren(vnode.children)) {
|
|
10057
|
+
warn$1(
|
|
10058
|
+
`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
|
|
10059
|
+
);
|
|
10060
|
+
}
|
|
10061
|
+
}
|
|
10007
10062
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
10008
10063
|
!isBlockNode && // has current parent block
|
|
10009
10064
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -10017,6 +10072,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10017
10072
|
}
|
|
10018
10073
|
return vnode;
|
|
10019
10074
|
}
|
|
10075
|
+
function hasContentChildren(children) {
|
|
10076
|
+
if (isString(children)) return children !== "";
|
|
10077
|
+
if (isArray(children)) return children.length > 0;
|
|
10078
|
+
return false;
|
|
10079
|
+
}
|
|
10020
10080
|
const createVNode = createVNodeWithArgsTransform ;
|
|
10021
10081
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
10022
10082
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -10453,7 +10513,12 @@ Component that was made reactive: `,
|
|
|
10453
10513
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10454
10514
|
if (isSSR) {
|
|
10455
10515
|
return setupResult.then((resolvedResult) => {
|
|
10456
|
-
|
|
10516
|
+
setInSSRSetupState(true);
|
|
10517
|
+
try {
|
|
10518
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
10519
|
+
} finally {
|
|
10520
|
+
setInSSRSetupState(false);
|
|
10521
|
+
}
|
|
10457
10522
|
}).catch((e) => {
|
|
10458
10523
|
handleError(e, instance, 0);
|
|
10459
10524
|
});
|
|
@@ -10917,7 +10982,7 @@ Component that was made reactive: `,
|
|
|
10917
10982
|
return true;
|
|
10918
10983
|
}
|
|
10919
10984
|
|
|
10920
|
-
const version = "3.5.
|
|
10985
|
+
const version = "3.5.41";
|
|
10921
10986
|
const warn = warn$1 ;
|
|
10922
10987
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10923
10988
|
const devtools = devtools$1 ;
|
|
@@ -11868,7 +11933,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11868
11933
|
if (parent && parent._pendingResolve) {
|
|
11869
11934
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
11870
11935
|
this._pendingResolve = void 0;
|
|
11871
|
-
this.
|
|
11936
|
+
if (this.isConnected) {
|
|
11937
|
+
return this._resolveDef();
|
|
11938
|
+
}
|
|
11872
11939
|
});
|
|
11873
11940
|
} else {
|
|
11874
11941
|
this._resolveDef();
|
|
@@ -11918,7 +11985,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11918
11985
|
*/
|
|
11919
11986
|
_resolveDef() {
|
|
11920
11987
|
if (this._pendingResolve) {
|
|
11921
|
-
return;
|
|
11988
|
+
return this._pendingResolve;
|
|
11922
11989
|
}
|
|
11923
11990
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
11924
11991
|
this._setAttr(this.attributes[i].name);
|
|
@@ -11958,6 +12025,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11958
12025
|
def.configureApp = this._def.configureApp;
|
|
11959
12026
|
resolve(this._def = def, true);
|
|
11960
12027
|
});
|
|
12028
|
+
return this._pendingResolve;
|
|
11961
12029
|
} else {
|
|
11962
12030
|
resolve(this._def);
|
|
11963
12031
|
}
|
|
@@ -11995,6 +12063,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11995
12063
|
}
|
|
11996
12064
|
}
|
|
11997
12065
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
12066
|
+
if (key in Object.getPrototypeOf(this)) {
|
|
12067
|
+
warn(
|
|
12068
|
+
`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`
|
|
12069
|
+
);
|
|
12070
|
+
}
|
|
11998
12071
|
Object.defineProperty(this, key, {
|
|
11999
12072
|
get() {
|
|
12000
12073
|
return this._getProp(key);
|
|
@@ -12467,6 +12540,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12467
12540
|
}
|
|
12468
12541
|
}
|
|
12469
12542
|
const assignKey = /* @__PURE__ */ Symbol("_assign");
|
|
12543
|
+
const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
|
|
12470
12544
|
function castValue(value, trim, number) {
|
|
12471
12545
|
if (trim) value = value.trim();
|
|
12472
12546
|
if (number) value = looseToNumber(value);
|
|
@@ -12474,6 +12548,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12474
12548
|
}
|
|
12475
12549
|
const vModelText = {
|
|
12476
12550
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
12551
|
+
if (el.parentNode) {
|
|
12552
|
+
if (el.type === "text") {
|
|
12553
|
+
el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
12554
|
+
} else if (el.type === "textarea") {
|
|
12555
|
+
el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
12556
|
+
}
|
|
12557
|
+
}
|
|
12477
12558
|
el[assignKey] = getModelAssigner(vnode);
|
|
12478
12559
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
12479
12560
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
@@ -12492,8 +12573,15 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12492
12573
|
}
|
|
12493
12574
|
},
|
|
12494
12575
|
// set value on mounted so it's after min/max for type="range"
|
|
12495
|
-
mounted(el, { value }) {
|
|
12496
|
-
|
|
12576
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
12577
|
+
const newValue = value == null ? "" : value;
|
|
12578
|
+
const initialValue = el[initialValueKey];
|
|
12579
|
+
delete el[initialValueKey];
|
|
12580
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
|
|
12581
|
+
el[assignKey](castValue(el.value, trim, number));
|
|
12582
|
+
} else {
|
|
12583
|
+
el.value = newValue;
|
|
12584
|
+
}
|
|
12497
12585
|
},
|
|
12498
12586
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
12499
12587
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -12589,13 +12677,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12589
12677
|
// <select multiple> value need to be deep traversed
|
|
12590
12678
|
deep: true,
|
|
12591
12679
|
created(el, { value, modifiers: { number } }, vnode) {
|
|
12592
|
-
|
|
12680
|
+
el._modelValue = value;
|
|
12593
12681
|
addEventListener(el, "change", () => {
|
|
12594
12682
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
12595
12683
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
12596
12684
|
);
|
|
12597
12685
|
el[assignKey](
|
|
12598
|
-
el.multiple ?
|
|
12686
|
+
el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
12599
12687
|
);
|
|
12600
12688
|
el._assigning = true;
|
|
12601
12689
|
nextTick(() => {
|
|
@@ -12609,7 +12697,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12609
12697
|
mounted(el, { value }) {
|
|
12610
12698
|
setSelected(el, value);
|
|
12611
12699
|
},
|
|
12612
|
-
beforeUpdate(el,
|
|
12700
|
+
beforeUpdate(el, { value }, vnode) {
|
|
12701
|
+
el._modelValue = value;
|
|
12613
12702
|
el[assignKey] = getModelAssigner(vnode);
|
|
12614
12703
|
},
|
|
12615
12704
|
updated(el, { value }) {
|
|
@@ -14198,6 +14287,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14198
14287
|
return [props, callPath];
|
|
14199
14288
|
}
|
|
14200
14289
|
function injectProp(node, prop, context) {
|
|
14290
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) {
|
|
14291
|
+
return;
|
|
14292
|
+
}
|
|
14201
14293
|
let propsWithInjection;
|
|
14202
14294
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
14203
14295
|
let callPath = [];
|
|
@@ -14255,6 +14347,24 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14255
14347
|
}
|
|
14256
14348
|
}
|
|
14257
14349
|
}
|
|
14350
|
+
function injectSlotKey(node, prop) {
|
|
14351
|
+
var _a, _b, _c;
|
|
14352
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") {
|
|
14353
|
+
return false;
|
|
14354
|
+
}
|
|
14355
|
+
const props = node.arguments[2];
|
|
14356
|
+
if (props && !isString(props)) {
|
|
14357
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
14358
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) {
|
|
14359
|
+
return true;
|
|
14360
|
+
}
|
|
14361
|
+
}
|
|
14362
|
+
(_a = node.arguments)[2] || (_a[2] = "{}");
|
|
14363
|
+
(_b = node.arguments)[3] || (_b[3] = "undefined");
|
|
14364
|
+
(_c = node.arguments)[4] || (_c[4] = "undefined");
|
|
14365
|
+
node.arguments[5] = prop.value;
|
|
14366
|
+
return true;
|
|
14367
|
+
}
|
|
14258
14368
|
function hasProp(prop, props) {
|
|
14259
14369
|
let result = false;
|
|
14260
14370
|
if (prop.key.type === 4) {
|
|
@@ -16424,6 +16534,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16424
16534
|
node.loc
|
|
16425
16535
|
);
|
|
16426
16536
|
return () => {
|
|
16537
|
+
var _a;
|
|
16427
16538
|
let childBlock;
|
|
16428
16539
|
const { children } = forNode;
|
|
16429
16540
|
if (isTemplate) {
|
|
@@ -16467,7 +16578,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16467
16578
|
if (isTemplate && keyProperty) {
|
|
16468
16579
|
injectProp(childBlock, keyProperty, context);
|
|
16469
16580
|
}
|
|
16470
|
-
|
|
16581
|
+
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
16582
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
16471
16583
|
if (childBlock.isBlock) {
|
|
16472
16584
|
removeHelper(OPEN_BLOCK);
|
|
16473
16585
|
removeHelper(
|
|
@@ -16479,12 +16591,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16479
16591
|
);
|
|
16480
16592
|
}
|
|
16481
16593
|
}
|
|
16482
|
-
childBlock.isBlock =
|
|
16594
|
+
childBlock.isBlock = shouldUseBlock;
|
|
16483
16595
|
if (childBlock.isBlock) {
|
|
16484
16596
|
helper(OPEN_BLOCK);
|
|
16485
16597
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
16486
16598
|
} else {
|
|
16487
16599
|
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
16600
|
+
if (childBlock.needsPatch) {
|
|
16601
|
+
childBlock.patchFlag = ((_a = childBlock.patchFlag) != null ? _a : 0) | 512;
|
|
16602
|
+
}
|
|
16488
16603
|
}
|
|
16489
16604
|
}
|
|
16490
16605
|
if (memo) {
|
|
@@ -16860,6 +16975,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16860
16975
|
let vnodeDynamicProps;
|
|
16861
16976
|
let dynamicPropNames;
|
|
16862
16977
|
let vnodeDirectives;
|
|
16978
|
+
let needsPatch = false;
|
|
16979
|
+
let isBlockRequired = false;
|
|
16863
16980
|
let shouldUseBlock = (
|
|
16864
16981
|
// dynamic component may resolve to plain elements
|
|
16865
16982
|
isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
|
|
@@ -16879,6 +16996,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16879
16996
|
vnodeProps = propsBuildResult.props;
|
|
16880
16997
|
patchFlag = propsBuildResult.patchFlag;
|
|
16881
16998
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
16999
|
+
needsPatch = propsBuildResult.needsPatch;
|
|
17000
|
+
isBlockRequired = propsBuildResult.isBlockRequired;
|
|
16882
17001
|
const directives = propsBuildResult.directives;
|
|
16883
17002
|
vnodeDirectives = directives && directives.length ? createArrayExpression(
|
|
16884
17003
|
directives.map((dir) => buildDirectiveArgs(dir, context))
|
|
@@ -16929,7 +17048,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16929
17048
|
if (dynamicPropNames && dynamicPropNames.length) {
|
|
16930
17049
|
vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
16931
17050
|
}
|
|
16932
|
-
node.codegenNode = createVNodeCall(
|
|
17051
|
+
const vnodeCall = node.codegenNode = createVNodeCall(
|
|
16933
17052
|
context,
|
|
16934
17053
|
vnodeTag,
|
|
16935
17054
|
vnodeProps,
|
|
@@ -16942,6 +17061,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16942
17061
|
isComponent,
|
|
16943
17062
|
node.loc
|
|
16944
17063
|
);
|
|
17064
|
+
needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
|
|
17065
|
+
if (needsPatch) {
|
|
17066
|
+
vnodeCall.needsPatch = true;
|
|
17067
|
+
}
|
|
17068
|
+
if (isBlockRequired) {
|
|
17069
|
+
vnodeCall.isBlockRequired = true;
|
|
17070
|
+
}
|
|
16945
17071
|
};
|
|
16946
17072
|
};
|
|
16947
17073
|
function resolveComponentType(node, context, ssr = false) {
|
|
@@ -16990,6 +17116,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16990
17116
|
const runtimeDirectives = [];
|
|
16991
17117
|
const hasChildren = children.length > 0;
|
|
16992
17118
|
let shouldUseBlock = false;
|
|
17119
|
+
let isBlockRequired = false;
|
|
16993
17120
|
let patchFlag = 0;
|
|
16994
17121
|
let hasRef = false;
|
|
16995
17122
|
let hasClassBinding = false;
|
|
@@ -17031,19 +17158,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17031
17158
|
if (isEventHandler && isReservedProp(name)) {
|
|
17032
17159
|
hasVnodeHook = true;
|
|
17033
17160
|
}
|
|
17161
|
+
if (name === "ref") {
|
|
17162
|
+
hasRef = true;
|
|
17163
|
+
}
|
|
17034
17164
|
if (isEventHandler && value.type === 14) {
|
|
17035
17165
|
value = value.arguments[0];
|
|
17036
17166
|
}
|
|
17037
17167
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
17038
17168
|
return;
|
|
17039
17169
|
}
|
|
17040
|
-
if (name === "
|
|
17041
|
-
hasRef = true;
|
|
17042
|
-
} else if (name === "class") {
|
|
17170
|
+
if (name === "class") {
|
|
17043
17171
|
hasClassBinding = true;
|
|
17044
17172
|
} else if (name === "style") {
|
|
17045
17173
|
hasStyleBinding = true;
|
|
17046
|
-
} else if (name !== "key" && !dynamicPropNames.includes(name)) {
|
|
17174
|
+
} else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) {
|
|
17047
17175
|
dynamicPropNames.push(name);
|
|
17048
17176
|
}
|
|
17049
17177
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
|
|
@@ -17096,13 +17224,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17096
17224
|
if (isVOn && ssr) {
|
|
17097
17225
|
continue;
|
|
17098
17226
|
}
|
|
17099
|
-
if (
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
|
|
17104
|
-
) {
|
|
17227
|
+
if (isVBind && isStaticArgOf(arg, "key")) {
|
|
17228
|
+
shouldUseBlock = true;
|
|
17229
|
+
}
|
|
17230
|
+
if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
|
|
17105
17231
|
shouldUseBlock = true;
|
|
17232
|
+
isBlockRequired = true;
|
|
17106
17233
|
}
|
|
17107
17234
|
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
17108
17235
|
pushRefVForMarker();
|
|
@@ -17154,6 +17281,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17154
17281
|
runtimeDirectives.push(prop);
|
|
17155
17282
|
if (hasChildren) {
|
|
17156
17283
|
shouldUseBlock = true;
|
|
17284
|
+
isBlockRequired = true;
|
|
17157
17285
|
}
|
|
17158
17286
|
}
|
|
17159
17287
|
}
|
|
@@ -17192,7 +17320,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17192
17320
|
patchFlag |= 32;
|
|
17193
17321
|
}
|
|
17194
17322
|
}
|
|
17195
|
-
|
|
17323
|
+
const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
|
|
17324
|
+
if (!shouldUseBlock && needsPatch) {
|
|
17196
17325
|
patchFlag |= 512;
|
|
17197
17326
|
}
|
|
17198
17327
|
if (!context.inSSR && propsExpression) {
|
|
@@ -17258,7 +17387,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17258
17387
|
directives: runtimeDirectives,
|
|
17259
17388
|
patchFlag,
|
|
17260
17389
|
dynamicPropNames,
|
|
17261
|
-
shouldUseBlock
|
|
17390
|
+
shouldUseBlock,
|
|
17391
|
+
needsPatch,
|
|
17392
|
+
isBlockRequired
|
|
17262
17393
|
};
|
|
17263
17394
|
}
|
|
17264
17395
|
function dedupeProperties(properties) {
|