@vue/compat 3.3.8 → 3.3.9
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 +67 -22
- package/dist/vue.cjs.prod.js +47 -19
- package/dist/vue.esm-browser.js +58 -22
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.esm-bundler.js +59 -23
- package/dist/vue.global.js +58 -22
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +50 -17
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +51 -18
- package/dist/vue.runtime.global.js +50 -17
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
package/dist/vue.cjs.js
CHANGED
|
@@ -114,7 +114,7 @@ const PatchFlagNames = {
|
|
|
114
114
|
[4]: `STYLE`,
|
|
115
115
|
[8]: `PROPS`,
|
|
116
116
|
[16]: `FULL_PROPS`,
|
|
117
|
-
[32]: `
|
|
117
|
+
[32]: `NEED_HYDRATION`,
|
|
118
118
|
[64]: `STABLE_FRAGMENT`,
|
|
119
119
|
[128]: `KEYED_FRAGMENT`,
|
|
120
120
|
[256]: `UNKEYED_FRAGMENT`,
|
|
@@ -1074,7 +1074,7 @@ function createReadonlyMethod(type) {
|
|
|
1074
1074
|
toRaw(this)
|
|
1075
1075
|
);
|
|
1076
1076
|
}
|
|
1077
|
-
return type === "delete" ? false : this;
|
|
1077
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1078
1078
|
};
|
|
1079
1079
|
}
|
|
1080
1080
|
function createInstrumentations() {
|
|
@@ -2802,9 +2802,19 @@ function renderComponentRoot(instance) {
|
|
|
2802
2802
|
try {
|
|
2803
2803
|
if (vnode.shapeFlag & 4) {
|
|
2804
2804
|
const proxyToUse = withProxy || proxy;
|
|
2805
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2806
|
+
get(target, key, receiver) {
|
|
2807
|
+
warn(
|
|
2808
|
+
`Property '${String(
|
|
2809
|
+
key
|
|
2810
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2811
|
+
);
|
|
2812
|
+
return Reflect.get(target, key, receiver);
|
|
2813
|
+
}
|
|
2814
|
+
}) : proxyToUse;
|
|
2805
2815
|
result = normalizeVNode(
|
|
2806
2816
|
render.call(
|
|
2807
|
-
|
|
2817
|
+
thisProxy,
|
|
2808
2818
|
proxyToUse,
|
|
2809
2819
|
renderCache,
|
|
2810
2820
|
props,
|
|
@@ -3834,6 +3844,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3834
3844
|
let onCleanup = (fn) => {
|
|
3835
3845
|
cleanup = effect.onStop = () => {
|
|
3836
3846
|
callWithErrorHandling(fn, instance, 4);
|
|
3847
|
+
cleanup = effect.onStop = void 0;
|
|
3837
3848
|
};
|
|
3838
3849
|
};
|
|
3839
3850
|
let ssrCleanup;
|
|
@@ -4331,7 +4342,11 @@ function emptyPlaceholder(vnode) {
|
|
|
4331
4342
|
}
|
|
4332
4343
|
}
|
|
4333
4344
|
function getKeepAliveChild(vnode) {
|
|
4334
|
-
return isKeepAlive(vnode) ?
|
|
4345
|
+
return isKeepAlive(vnode) ? (
|
|
4346
|
+
// #7121 ensure get the child component subtree in case
|
|
4347
|
+
// it's been replaced during HMR
|
|
4348
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
4349
|
+
) : vnode;
|
|
4335
4350
|
}
|
|
4336
4351
|
function setTransitionHooks(vnode, hooks) {
|
|
4337
4352
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6354,7 +6369,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6354
6369
|
return vm;
|
|
6355
6370
|
}
|
|
6356
6371
|
}
|
|
6357
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6372
|
+
Vue.version = `2.6.14-compat:${"3.3.9"}`;
|
|
6358
6373
|
Vue.config = singletonApp.config;
|
|
6359
6374
|
Vue.use = (p, ...options) => {
|
|
6360
6375
|
if (p && isFunction(p.install)) {
|
|
@@ -7382,6 +7397,9 @@ function assertType(value, type) {
|
|
|
7382
7397
|
};
|
|
7383
7398
|
}
|
|
7384
7399
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7400
|
+
if (expectedTypes.length === 0) {
|
|
7401
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7402
|
+
}
|
|
7385
7403
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7386
7404
|
const expectedType = expectedTypes[0];
|
|
7387
7405
|
const receivedType = toRawType(value);
|
|
@@ -7653,6 +7671,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7653
7671
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7654
7672
|
let domType = node.nodeType;
|
|
7655
7673
|
vnode.el = node;
|
|
7674
|
+
{
|
|
7675
|
+
if (!("__vnode" in node)) {
|
|
7676
|
+
Object.defineProperty(node, "__vnode", {
|
|
7677
|
+
value: vnode,
|
|
7678
|
+
enumerable: false
|
|
7679
|
+
});
|
|
7680
|
+
}
|
|
7681
|
+
if (!("__vueParentComponent" in node)) {
|
|
7682
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
7683
|
+
value: parentComponent,
|
|
7684
|
+
enumerable: false
|
|
7685
|
+
});
|
|
7686
|
+
}
|
|
7687
|
+
}
|
|
7656
7688
|
if (patchFlag === -2) {
|
|
7657
7689
|
optimized = false;
|
|
7658
7690
|
vnode.dynamicChildren = null;
|
|
@@ -7814,15 +7846,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7814
7846
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7815
7847
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7816
7848
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7817
|
-
const
|
|
7849
|
+
const forcePatch = type === "input" || type === "option";
|
|
7818
7850
|
{
|
|
7819
7851
|
if (dirs) {
|
|
7820
7852
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7821
7853
|
}
|
|
7822
7854
|
if (props) {
|
|
7823
|
-
if (
|
|
7855
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7824
7856
|
for (const key in props) {
|
|
7825
|
-
if (
|
|
7857
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7858
|
+
key[0] === ".") {
|
|
7826
7859
|
patchProp(
|
|
7827
7860
|
el,
|
|
7828
7861
|
key,
|
|
@@ -9613,6 +9646,7 @@ const resolveTarget = (props, select) => {
|
|
|
9613
9646
|
}
|
|
9614
9647
|
};
|
|
9615
9648
|
const TeleportImpl = {
|
|
9649
|
+
name: "Teleport",
|
|
9616
9650
|
__isTeleport: true,
|
|
9617
9651
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
9618
9652
|
const {
|
|
@@ -10092,7 +10126,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
10092
10126
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
10093
10127
|
type = toRaw(type);
|
|
10094
10128
|
warn(
|
|
10095
|
-
`Vue received a Component
|
|
10129
|
+
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
10096
10130
|
`
|
|
10097
10131
|
Component that was made reactive: `,
|
|
10098
10132
|
type
|
|
@@ -10940,7 +10974,7 @@ function isMemoSame(cached, memo) {
|
|
|
10940
10974
|
return true;
|
|
10941
10975
|
}
|
|
10942
10976
|
|
|
10943
|
-
const version = "3.3.
|
|
10977
|
+
const version = "3.3.9";
|
|
10944
10978
|
const _ssrUtils = {
|
|
10945
10979
|
createComponentInstance,
|
|
10946
10980
|
setupComponent,
|
|
@@ -12141,21 +12175,20 @@ const vModelText = {
|
|
|
12141
12175
|
el[assignKey] = getModelAssigner(vnode);
|
|
12142
12176
|
if (el.composing)
|
|
12143
12177
|
return;
|
|
12178
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12179
|
+
const newValue = value == null ? "" : value;
|
|
12180
|
+
if (elValue === newValue) {
|
|
12181
|
+
return;
|
|
12182
|
+
}
|
|
12144
12183
|
if (document.activeElement === el && el.type !== "range") {
|
|
12145
12184
|
if (lazy) {
|
|
12146
12185
|
return;
|
|
12147
12186
|
}
|
|
12148
|
-
if (trim && el.value.trim() ===
|
|
12149
|
-
return;
|
|
12150
|
-
}
|
|
12151
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
12187
|
+
if (trim && el.value.trim() === newValue) {
|
|
12152
12188
|
return;
|
|
12153
12189
|
}
|
|
12154
12190
|
}
|
|
12155
|
-
|
|
12156
|
-
if (el.value !== newValue) {
|
|
12157
|
-
el.value = newValue;
|
|
12158
|
-
}
|
|
12191
|
+
el.value = newValue;
|
|
12159
12192
|
}
|
|
12160
12193
|
};
|
|
12161
12194
|
const vModelCheckbox = {
|
|
@@ -13301,6 +13334,7 @@ function getMemoedVNodeCall(node) {
|
|
|
13301
13334
|
return node;
|
|
13302
13335
|
}
|
|
13303
13336
|
}
|
|
13337
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13304
13338
|
|
|
13305
13339
|
const deprecationData = {
|
|
13306
13340
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -15551,6 +15585,15 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
15551
15585
|
if (stmt.declare || !stmt.id)
|
|
15552
15586
|
continue;
|
|
15553
15587
|
onIdent(stmt.id);
|
|
15588
|
+
} else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
|
|
15589
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
15590
|
+
if (variable && variable.type === "VariableDeclaration") {
|
|
15591
|
+
for (const decl of variable.declarations) {
|
|
15592
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
15593
|
+
onIdent(id);
|
|
15594
|
+
}
|
|
15595
|
+
}
|
|
15596
|
+
}
|
|
15554
15597
|
}
|
|
15555
15598
|
}
|
|
15556
15599
|
}
|
|
@@ -16341,7 +16384,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
16341
16384
|
onExit();
|
|
16342
16385
|
};
|
|
16343
16386
|
}
|
|
16344
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
16345
16387
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
16346
16388
|
const stripParensRE = /^\(|\)$/g;
|
|
16347
16389
|
function parseForExpression(input, context) {
|
|
@@ -17023,7 +17065,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17023
17065
|
)
|
|
17024
17066
|
);
|
|
17025
17067
|
} else {
|
|
17026
|
-
const { name, arg, exp, loc } = prop;
|
|
17068
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
17027
17069
|
const isVBind = name === "bind";
|
|
17028
17070
|
const isVOn = name === "on";
|
|
17029
17071
|
if (name === "slot") {
|
|
@@ -17116,6 +17158,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17116
17158
|
}
|
|
17117
17159
|
continue;
|
|
17118
17160
|
}
|
|
17161
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
17162
|
+
patchFlag |= 32;
|
|
17163
|
+
}
|
|
17119
17164
|
const directiveTransform = context.directiveTransforms[name];
|
|
17120
17165
|
if (directiveTransform) {
|
|
17121
17166
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -20525,8 +20570,8 @@ const transformModel = (dir, node, context) => {
|
|
|
20525
20570
|
);
|
|
20526
20571
|
}
|
|
20527
20572
|
function checkDuplicatedValue() {
|
|
20528
|
-
const value =
|
|
20529
|
-
if (value) {
|
|
20573
|
+
const value = findDir(node, "bind");
|
|
20574
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
20530
20575
|
context.onError(
|
|
20531
20576
|
createDOMCompilerError(
|
|
20532
20577
|
60,
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -962,7 +962,7 @@ function createIterableMethod(method, isReadonly, isShallow) {
|
|
|
962
962
|
}
|
|
963
963
|
function createReadonlyMethod(type) {
|
|
964
964
|
return function(...args) {
|
|
965
|
-
return type === "delete" ? false : this;
|
|
965
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
function createInstrumentations() {
|
|
@@ -1972,9 +1972,19 @@ function renderComponentRoot(instance) {
|
|
|
1972
1972
|
try {
|
|
1973
1973
|
if (vnode.shapeFlag & 4) {
|
|
1974
1974
|
const proxyToUse = withProxy || proxy;
|
|
1975
|
+
const thisProxy = false ? new Proxy(proxyToUse, {
|
|
1976
|
+
get(target, key, receiver) {
|
|
1977
|
+
warn(
|
|
1978
|
+
`Property '${String(
|
|
1979
|
+
key
|
|
1980
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
1981
|
+
);
|
|
1982
|
+
return Reflect.get(target, key, receiver);
|
|
1983
|
+
}
|
|
1984
|
+
}) : proxyToUse;
|
|
1975
1985
|
result = normalizeVNode(
|
|
1976
1986
|
render.call(
|
|
1977
|
-
|
|
1987
|
+
thisProxy,
|
|
1978
1988
|
proxyToUse,
|
|
1979
1989
|
renderCache,
|
|
1980
1990
|
props,
|
|
@@ -2861,6 +2871,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
2861
2871
|
let onCleanup = (fn) => {
|
|
2862
2872
|
cleanup = effect.onStop = () => {
|
|
2863
2873
|
callWithErrorHandling(fn, instance, 4);
|
|
2874
|
+
cleanup = effect.onStop = void 0;
|
|
2864
2875
|
};
|
|
2865
2876
|
};
|
|
2866
2877
|
let ssrCleanup;
|
|
@@ -3338,7 +3349,11 @@ function emptyPlaceholder(vnode) {
|
|
|
3338
3349
|
}
|
|
3339
3350
|
}
|
|
3340
3351
|
function getKeepAliveChild(vnode) {
|
|
3341
|
-
return isKeepAlive(vnode) ?
|
|
3352
|
+
return isKeepAlive(vnode) ? (
|
|
3353
|
+
// #7121 ensure get the child component subtree in case
|
|
3354
|
+
// it's been replaced during HMR
|
|
3355
|
+
vnode.children ? vnode.children[0] : void 0
|
|
3356
|
+
) : vnode;
|
|
3342
3357
|
}
|
|
3343
3358
|
function setTransitionHooks(vnode, hooks) {
|
|
3344
3359
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -5072,7 +5087,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5072
5087
|
return vm;
|
|
5073
5088
|
}
|
|
5074
5089
|
}
|
|
5075
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
5090
|
+
Vue.version = `2.6.14-compat:${"3.3.9"}`;
|
|
5076
5091
|
Vue.config = singletonApp.config;
|
|
5077
5092
|
Vue.use = (p, ...options) => {
|
|
5078
5093
|
if (p && isFunction(p.install)) {
|
|
@@ -6253,15 +6268,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6253
6268
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6254
6269
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6255
6270
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6256
|
-
const
|
|
6257
|
-
if (
|
|
6271
|
+
const forcePatch = type === "input" || type === "option";
|
|
6272
|
+
if (forcePatch || patchFlag !== -1) {
|
|
6258
6273
|
if (dirs) {
|
|
6259
6274
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
6260
6275
|
}
|
|
6261
6276
|
if (props) {
|
|
6262
|
-
if (
|
|
6277
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
6263
6278
|
for (const key in props) {
|
|
6264
|
-
if (
|
|
6279
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
6280
|
+
key[0] === ".") {
|
|
6265
6281
|
patchProp(
|
|
6266
6282
|
el,
|
|
6267
6283
|
key,
|
|
@@ -7833,6 +7849,7 @@ const resolveTarget = (props, select) => {
|
|
|
7833
7849
|
}
|
|
7834
7850
|
};
|
|
7835
7851
|
const TeleportImpl = {
|
|
7852
|
+
name: "Teleport",
|
|
7836
7853
|
__isTeleport: true,
|
|
7837
7854
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
7838
7855
|
const {
|
|
@@ -8799,7 +8816,7 @@ function isMemoSame(cached, memo) {
|
|
|
8799
8816
|
return true;
|
|
8800
8817
|
}
|
|
8801
8818
|
|
|
8802
|
-
const version = "3.3.
|
|
8819
|
+
const version = "3.3.9";
|
|
8803
8820
|
const _ssrUtils = {
|
|
8804
8821
|
createComponentInstance,
|
|
8805
8822
|
setupComponent,
|
|
@@ -9954,21 +9971,20 @@ const vModelText = {
|
|
|
9954
9971
|
el[assignKey] = getModelAssigner(vnode);
|
|
9955
9972
|
if (el.composing)
|
|
9956
9973
|
return;
|
|
9974
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
9975
|
+
const newValue = value == null ? "" : value;
|
|
9976
|
+
if (elValue === newValue) {
|
|
9977
|
+
return;
|
|
9978
|
+
}
|
|
9957
9979
|
if (document.activeElement === el && el.type !== "range") {
|
|
9958
9980
|
if (lazy) {
|
|
9959
9981
|
return;
|
|
9960
9982
|
}
|
|
9961
|
-
if (trim && el.value.trim() ===
|
|
9962
|
-
return;
|
|
9963
|
-
}
|
|
9964
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
9983
|
+
if (trim && el.value.trim() === newValue) {
|
|
9965
9984
|
return;
|
|
9966
9985
|
}
|
|
9967
9986
|
}
|
|
9968
|
-
|
|
9969
|
-
if (el.value !== newValue) {
|
|
9970
|
-
el.value = newValue;
|
|
9971
|
-
}
|
|
9987
|
+
el.value = newValue;
|
|
9972
9988
|
}
|
|
9973
9989
|
};
|
|
9974
9990
|
const vModelCheckbox = {
|
|
@@ -11034,6 +11050,7 @@ function getMemoedVNodeCall(node) {
|
|
|
11034
11050
|
return node;
|
|
11035
11051
|
}
|
|
11036
11052
|
}
|
|
11053
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
11037
11054
|
|
|
11038
11055
|
function getCompatValue(key, context) {
|
|
11039
11056
|
const config = context.options ? context.options.compatConfig : context.compatConfig;
|
|
@@ -13163,6 +13180,15 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
13163
13180
|
if (stmt.declare || !stmt.id)
|
|
13164
13181
|
continue;
|
|
13165
13182
|
onIdent(stmt.id);
|
|
13183
|
+
} else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
|
|
13184
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
13185
|
+
if (variable && variable.type === "VariableDeclaration") {
|
|
13186
|
+
for (const decl of variable.declarations) {
|
|
13187
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
13188
|
+
onIdent(id);
|
|
13189
|
+
}
|
|
13190
|
+
}
|
|
13191
|
+
}
|
|
13166
13192
|
}
|
|
13167
13193
|
}
|
|
13168
13194
|
}
|
|
@@ -13942,7 +13968,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
13942
13968
|
onExit();
|
|
13943
13969
|
};
|
|
13944
13970
|
}
|
|
13945
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13946
13971
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
13947
13972
|
const stripParensRE = /^\(|\)$/g;
|
|
13948
13973
|
function parseForExpression(input, context) {
|
|
@@ -14605,7 +14630,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14605
14630
|
)
|
|
14606
14631
|
);
|
|
14607
14632
|
} else {
|
|
14608
|
-
const { name, arg, exp, loc } = prop;
|
|
14633
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
14609
14634
|
const isVBind = name === "bind";
|
|
14610
14635
|
const isVOn = name === "on";
|
|
14611
14636
|
if (name === "slot") {
|
|
@@ -14677,6 +14702,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14677
14702
|
}
|
|
14678
14703
|
continue;
|
|
14679
14704
|
}
|
|
14705
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
14706
|
+
patchFlag |= 32;
|
|
14707
|
+
}
|
|
14680
14708
|
const directiveTransform = context.directiveTransforms[name];
|
|
14681
14709
|
if (directiveTransform) {
|
|
14682
14710
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -104,7 +104,7 @@ const PatchFlagNames = {
|
|
|
104
104
|
[4]: `STYLE`,
|
|
105
105
|
[8]: `PROPS`,
|
|
106
106
|
[16]: `FULL_PROPS`,
|
|
107
|
-
[32]: `
|
|
107
|
+
[32]: `NEED_HYDRATION`,
|
|
108
108
|
[64]: `STABLE_FRAGMENT`,
|
|
109
109
|
[128]: `KEYED_FRAGMENT`,
|
|
110
110
|
[256]: `UNKEYED_FRAGMENT`,
|
|
@@ -1001,7 +1001,7 @@ function createReadonlyMethod(type) {
|
|
|
1001
1001
|
toRaw(this)
|
|
1002
1002
|
);
|
|
1003
1003
|
}
|
|
1004
|
-
return type === "delete" ? false : this;
|
|
1004
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
1007
|
function createInstrumentations() {
|
|
@@ -2729,9 +2729,19 @@ function renderComponentRoot(instance) {
|
|
|
2729
2729
|
try {
|
|
2730
2730
|
if (vnode.shapeFlag & 4) {
|
|
2731
2731
|
const proxyToUse = withProxy || proxy;
|
|
2732
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2733
|
+
get(target, key, receiver) {
|
|
2734
|
+
warn(
|
|
2735
|
+
`Property '${String(
|
|
2736
|
+
key
|
|
2737
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2738
|
+
);
|
|
2739
|
+
return Reflect.get(target, key, receiver);
|
|
2740
|
+
}
|
|
2741
|
+
}) : proxyToUse;
|
|
2732
2742
|
result = normalizeVNode(
|
|
2733
2743
|
render.call(
|
|
2734
|
-
|
|
2744
|
+
thisProxy,
|
|
2735
2745
|
proxyToUse,
|
|
2736
2746
|
renderCache,
|
|
2737
2747
|
props,
|
|
@@ -3761,6 +3771,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3761
3771
|
let onCleanup = (fn) => {
|
|
3762
3772
|
cleanup = effect.onStop = () => {
|
|
3763
3773
|
callWithErrorHandling(fn, instance, 4);
|
|
3774
|
+
cleanup = effect.onStop = void 0;
|
|
3764
3775
|
};
|
|
3765
3776
|
};
|
|
3766
3777
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -4237,7 +4248,11 @@ function emptyPlaceholder(vnode) {
|
|
|
4237
4248
|
}
|
|
4238
4249
|
}
|
|
4239
4250
|
function getKeepAliveChild(vnode) {
|
|
4240
|
-
return isKeepAlive(vnode) ?
|
|
4251
|
+
return isKeepAlive(vnode) ? (
|
|
4252
|
+
// #7121 ensure get the child component subtree in case
|
|
4253
|
+
// it's been replaced during HMR
|
|
4254
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
4255
|
+
) : vnode;
|
|
4241
4256
|
}
|
|
4242
4257
|
function setTransitionHooks(vnode, hooks) {
|
|
4243
4258
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6254,7 +6269,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6254
6269
|
return vm;
|
|
6255
6270
|
}
|
|
6256
6271
|
}
|
|
6257
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6272
|
+
Vue.version = `2.6.14-compat:${"3.3.9"}`;
|
|
6258
6273
|
Vue.config = singletonApp.config;
|
|
6259
6274
|
Vue.use = (p, ...options) => {
|
|
6260
6275
|
if (p && isFunction(p.install)) {
|
|
@@ -7282,6 +7297,9 @@ function assertType(value, type) {
|
|
|
7282
7297
|
};
|
|
7283
7298
|
}
|
|
7284
7299
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7300
|
+
if (expectedTypes.length === 0) {
|
|
7301
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7302
|
+
}
|
|
7285
7303
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7286
7304
|
const expectedType = expectedTypes[0];
|
|
7287
7305
|
const receivedType = toRawType(value);
|
|
@@ -7553,6 +7571,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7553
7571
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7554
7572
|
let domType = node.nodeType;
|
|
7555
7573
|
vnode.el = node;
|
|
7574
|
+
{
|
|
7575
|
+
if (!("__vnode" in node)) {
|
|
7576
|
+
Object.defineProperty(node, "__vnode", {
|
|
7577
|
+
value: vnode,
|
|
7578
|
+
enumerable: false
|
|
7579
|
+
});
|
|
7580
|
+
}
|
|
7581
|
+
if (!("__vueParentComponent" in node)) {
|
|
7582
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
7583
|
+
value: parentComponent,
|
|
7584
|
+
enumerable: false
|
|
7585
|
+
});
|
|
7586
|
+
}
|
|
7587
|
+
}
|
|
7556
7588
|
if (patchFlag === -2) {
|
|
7557
7589
|
optimized = false;
|
|
7558
7590
|
vnode.dynamicChildren = null;
|
|
@@ -7714,15 +7746,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7714
7746
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7715
7747
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7716
7748
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7717
|
-
const
|
|
7749
|
+
const forcePatch = type === "input" || type === "option";
|
|
7718
7750
|
{
|
|
7719
7751
|
if (dirs) {
|
|
7720
7752
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7721
7753
|
}
|
|
7722
7754
|
if (props) {
|
|
7723
|
-
if (
|
|
7755
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7724
7756
|
for (const key in props) {
|
|
7725
|
-
if (
|
|
7757
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7758
|
+
key[0] === ".") {
|
|
7726
7759
|
patchProp(
|
|
7727
7760
|
el,
|
|
7728
7761
|
key,
|
|
@@ -9513,6 +9546,7 @@ const resolveTarget = (props, select) => {
|
|
|
9513
9546
|
}
|
|
9514
9547
|
};
|
|
9515
9548
|
const TeleportImpl = {
|
|
9549
|
+
name: "Teleport",
|
|
9516
9550
|
__isTeleport: true,
|
|
9517
9551
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
9518
9552
|
const {
|
|
@@ -9992,7 +10026,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
9992
10026
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
9993
10027
|
type = toRaw(type);
|
|
9994
10028
|
warn(
|
|
9995
|
-
`Vue received a Component
|
|
10029
|
+
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
9996
10030
|
`
|
|
9997
10031
|
Component that was made reactive: `,
|
|
9998
10032
|
type
|
|
@@ -10828,7 +10862,7 @@ function isMemoSame(cached, memo) {
|
|
|
10828
10862
|
return true;
|
|
10829
10863
|
}
|
|
10830
10864
|
|
|
10831
|
-
const version = "3.3.
|
|
10865
|
+
const version = "3.3.9";
|
|
10832
10866
|
const ssrUtils = null;
|
|
10833
10867
|
const resolveFilter = resolveFilter$1 ;
|
|
10834
10868
|
const _compatUtils = {
|
|
@@ -12069,21 +12103,20 @@ const vModelText = {
|
|
|
12069
12103
|
el[assignKey] = getModelAssigner(vnode);
|
|
12070
12104
|
if (el.composing)
|
|
12071
12105
|
return;
|
|
12106
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12107
|
+
const newValue = value == null ? "" : value;
|
|
12108
|
+
if (elValue === newValue) {
|
|
12109
|
+
return;
|
|
12110
|
+
}
|
|
12072
12111
|
if (document.activeElement === el && el.type !== "range") {
|
|
12073
12112
|
if (lazy) {
|
|
12074
12113
|
return;
|
|
12075
12114
|
}
|
|
12076
|
-
if (trim && el.value.trim() ===
|
|
12077
|
-
return;
|
|
12078
|
-
}
|
|
12079
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
12115
|
+
if (trim && el.value.trim() === newValue) {
|
|
12080
12116
|
return;
|
|
12081
12117
|
}
|
|
12082
12118
|
}
|
|
12083
|
-
|
|
12084
|
-
if (el.value !== newValue) {
|
|
12085
|
-
el.value = newValue;
|
|
12086
|
-
}
|
|
12119
|
+
el.value = newValue;
|
|
12087
12120
|
}
|
|
12088
12121
|
};
|
|
12089
12122
|
const vModelCheckbox = {
|
|
@@ -13216,6 +13249,7 @@ function getMemoedVNodeCall(node) {
|
|
|
13216
13249
|
return node;
|
|
13217
13250
|
}
|
|
13218
13251
|
}
|
|
13252
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13219
13253
|
|
|
13220
13254
|
const deprecationData = {
|
|
13221
13255
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -15613,7 +15647,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
15613
15647
|
onExit();
|
|
15614
15648
|
};
|
|
15615
15649
|
}
|
|
15616
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
15617
15650
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
15618
15651
|
const stripParensRE = /^\(|\)$/g;
|
|
15619
15652
|
function parseForExpression(input, context) {
|
|
@@ -16211,7 +16244,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16211
16244
|
)
|
|
16212
16245
|
);
|
|
16213
16246
|
} else {
|
|
16214
|
-
const { name, arg, exp, loc } = prop;
|
|
16247
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
16215
16248
|
const isVBind = name === "bind";
|
|
16216
16249
|
const isVOn = name === "on";
|
|
16217
16250
|
if (name === "slot") {
|
|
@@ -16304,6 +16337,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16304
16337
|
}
|
|
16305
16338
|
continue;
|
|
16306
16339
|
}
|
|
16340
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
16341
|
+
patchFlag |= 32;
|
|
16342
|
+
}
|
|
16307
16343
|
const directiveTransform = context.directiveTransforms[name];
|
|
16308
16344
|
if (directiveTransform) {
|
|
16309
16345
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -17336,8 +17372,8 @@ const transformModel = (dir, node, context) => {
|
|
|
17336
17372
|
);
|
|
17337
17373
|
}
|
|
17338
17374
|
function checkDuplicatedValue() {
|
|
17339
|
-
const value =
|
|
17340
|
-
if (value) {
|
|
17375
|
+
const value = findDir(node, "bind");
|
|
17376
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
17341
17377
|
context.onError(
|
|
17342
17378
|
createDOMCompilerError(
|
|
17343
17379
|
60,
|