@vue/compat 3.3.8 → 3.3.10
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 +98 -37
- package/dist/vue.cjs.prod.js +75 -31
- package/dist/vue.esm-browser.js +85 -37
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +86 -38
- package/dist/vue.global.js +85 -37
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +74 -32
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +75 -33
- package/dist/vue.runtime.global.js +74 -32
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +3 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -12,8 +12,8 @@ const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([])
|
|
|
12
12
|
const NOOP = () => {
|
|
13
13
|
};
|
|
14
14
|
const NO = () => false;
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
16
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
17
17
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
18
18
|
const extend = Object.assign;
|
|
19
19
|
const remove = (arr, el) => {
|
|
@@ -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`,
|
|
@@ -1005,7 +1005,7 @@ function createReadonlyMethod(type) {
|
|
|
1005
1005
|
toRaw(this)
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
|
-
return type === "delete" ? false : this;
|
|
1008
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
1011
|
function createInstrumentations() {
|
|
@@ -2746,9 +2746,19 @@ function renderComponentRoot(instance) {
|
|
|
2746
2746
|
try {
|
|
2747
2747
|
if (vnode.shapeFlag & 4) {
|
|
2748
2748
|
const proxyToUse = withProxy || proxy;
|
|
2749
|
+
const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2750
|
+
get(target, key, receiver) {
|
|
2751
|
+
warn(
|
|
2752
|
+
`Property '${String(
|
|
2753
|
+
key
|
|
2754
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2755
|
+
);
|
|
2756
|
+
return Reflect.get(target, key, receiver);
|
|
2757
|
+
}
|
|
2758
|
+
}) : proxyToUse;
|
|
2749
2759
|
result = normalizeVNode(
|
|
2750
2760
|
render.call(
|
|
2751
|
-
|
|
2761
|
+
thisProxy,
|
|
2752
2762
|
proxyToUse,
|
|
2753
2763
|
renderCache,
|
|
2754
2764
|
props,
|
|
@@ -3379,7 +3389,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3379
3389
|
if (delayEnter) {
|
|
3380
3390
|
activeBranch.transition.afterLeave = () => {
|
|
3381
3391
|
if (pendingId === suspense.pendingId) {
|
|
3382
|
-
move(
|
|
3392
|
+
move(
|
|
3393
|
+
pendingBranch,
|
|
3394
|
+
container2,
|
|
3395
|
+
next(activeBranch),
|
|
3396
|
+
0
|
|
3397
|
+
);
|
|
3383
3398
|
queuePostFlushCb(effects);
|
|
3384
3399
|
}
|
|
3385
3400
|
};
|
|
@@ -3426,7 +3441,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3426
3441
|
}
|
|
3427
3442
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
3428
3443
|
triggerEvent(vnode2, "onFallback");
|
|
3429
|
-
const anchor2 = next(activeBranch);
|
|
3430
3444
|
const mountFallback = () => {
|
|
3431
3445
|
if (!suspense.isInFallback) {
|
|
3432
3446
|
return;
|
|
@@ -3435,7 +3449,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3435
3449
|
null,
|
|
3436
3450
|
fallbackVNode,
|
|
3437
3451
|
container2,
|
|
3438
|
-
|
|
3452
|
+
next(activeBranch),
|
|
3439
3453
|
parentComponent2,
|
|
3440
3454
|
null,
|
|
3441
3455
|
// fallback tree will not have suspense context
|
|
@@ -3778,6 +3792,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3778
3792
|
let onCleanup = (fn) => {
|
|
3779
3793
|
cleanup = effect.onStop = () => {
|
|
3780
3794
|
callWithErrorHandling(fn, instance, 4);
|
|
3795
|
+
cleanup = effect.onStop = void 0;
|
|
3781
3796
|
};
|
|
3782
3797
|
};
|
|
3783
3798
|
let ssrCleanup;
|
|
@@ -4277,7 +4292,11 @@ function emptyPlaceholder(vnode) {
|
|
|
4277
4292
|
}
|
|
4278
4293
|
}
|
|
4279
4294
|
function getKeepAliveChild(vnode) {
|
|
4280
|
-
return isKeepAlive(vnode) ?
|
|
4295
|
+
return isKeepAlive(vnode) ? (
|
|
4296
|
+
// #7121 ensure get the child component subtree in case
|
|
4297
|
+
// it's been replaced during HMR
|
|
4298
|
+
!!(process.env.NODE_ENV !== "production") && vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
4299
|
+
) : vnode;
|
|
4281
4300
|
}
|
|
4282
4301
|
function setTransitionHooks(vnode, hooks) {
|
|
4283
4302
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6302,7 +6321,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6302
6321
|
return vm;
|
|
6303
6322
|
}
|
|
6304
6323
|
}
|
|
6305
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6324
|
+
Vue.version = `2.6.14-compat:${"3.3.10"}`;
|
|
6306
6325
|
Vue.config = singletonApp.config;
|
|
6307
6326
|
Vue.use = (p, ...options) => {
|
|
6308
6327
|
if (p && isFunction(p.install)) {
|
|
@@ -7333,6 +7352,9 @@ function assertType(value, type) {
|
|
|
7333
7352
|
};
|
|
7334
7353
|
}
|
|
7335
7354
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7355
|
+
if (expectedTypes.length === 0) {
|
|
7356
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7357
|
+
}
|
|
7336
7358
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7337
7359
|
const expectedType = expectedTypes[0];
|
|
7338
7360
|
const receivedType = toRawType(value);
|
|
@@ -7604,6 +7626,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7604
7626
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7605
7627
|
let domType = node.nodeType;
|
|
7606
7628
|
vnode.el = node;
|
|
7629
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
7630
|
+
if (!("__vnode" in node)) {
|
|
7631
|
+
Object.defineProperty(node, "__vnode", {
|
|
7632
|
+
value: vnode,
|
|
7633
|
+
enumerable: false
|
|
7634
|
+
});
|
|
7635
|
+
}
|
|
7636
|
+
if (!("__vueParentComponent" in node)) {
|
|
7637
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
7638
|
+
value: parentComponent,
|
|
7639
|
+
enumerable: false
|
|
7640
|
+
});
|
|
7641
|
+
}
|
|
7642
|
+
}
|
|
7607
7643
|
if (patchFlag === -2) {
|
|
7608
7644
|
optimized = false;
|
|
7609
7645
|
vnode.dynamicChildren = null;
|
|
@@ -7765,15 +7801,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7765
7801
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7766
7802
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7767
7803
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7768
|
-
const
|
|
7769
|
-
if (!!(process.env.NODE_ENV !== "production") ||
|
|
7804
|
+
const forcePatch = type === "input" || type === "option";
|
|
7805
|
+
if (!!(process.env.NODE_ENV !== "production") || forcePatch || patchFlag !== -1) {
|
|
7770
7806
|
if (dirs) {
|
|
7771
7807
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7772
7808
|
}
|
|
7773
7809
|
if (props) {
|
|
7774
|
-
if (
|
|
7810
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7775
7811
|
for (const key in props) {
|
|
7776
|
-
if (
|
|
7812
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7813
|
+
key[0] === ".") {
|
|
7777
7814
|
patchProp(
|
|
7778
7815
|
el,
|
|
7779
7816
|
key,
|
|
@@ -9598,6 +9635,7 @@ const resolveTarget = (props, select) => {
|
|
|
9598
9635
|
}
|
|
9599
9636
|
};
|
|
9600
9637
|
const TeleportImpl = {
|
|
9638
|
+
name: "Teleport",
|
|
9601
9639
|
__isTeleport: true,
|
|
9602
9640
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
9603
9641
|
const {
|
|
@@ -10077,7 +10115,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
10077
10115
|
if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
|
|
10078
10116
|
type = toRaw(type);
|
|
10079
10117
|
warn(
|
|
10080
|
-
`Vue received a Component
|
|
10118
|
+
`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\`.`,
|
|
10081
10119
|
`
|
|
10082
10120
|
Component that was made reactive: `,
|
|
10083
10121
|
type
|
|
@@ -10745,9 +10783,9 @@ function initCustomFormatter() {
|
|
|
10745
10783
|
return;
|
|
10746
10784
|
}
|
|
10747
10785
|
const vueStyle = { style: "color:#3ba776" };
|
|
10748
|
-
const numberStyle = { style: "color:#
|
|
10749
|
-
const stringStyle = { style: "color:#
|
|
10750
|
-
const keywordStyle = { style: "color:#
|
|
10786
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
10787
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
10788
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
10751
10789
|
const formatter = {
|
|
10752
10790
|
header(obj) {
|
|
10753
10791
|
if (!isObject(obj)) {
|
|
@@ -10941,7 +10979,7 @@ function isMemoSame(cached, memo) {
|
|
|
10941
10979
|
return true;
|
|
10942
10980
|
}
|
|
10943
10981
|
|
|
10944
|
-
const version = "3.3.
|
|
10982
|
+
const version = "3.3.10";
|
|
10945
10983
|
const _ssrUtils = {
|
|
10946
10984
|
createComponentInstance,
|
|
10947
10985
|
setupComponent,
|
|
@@ -11655,7 +11693,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
11655
11693
|
}
|
|
11656
11694
|
}
|
|
11657
11695
|
|
|
11658
|
-
const
|
|
11696
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11697
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11659
11698
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11660
11699
|
if (key === "class") {
|
|
11661
11700
|
patchClass(el, nextValue, isSVG);
|
|
@@ -11689,7 +11728,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11689
11728
|
if (key === "innerHTML" || key === "textContent") {
|
|
11690
11729
|
return true;
|
|
11691
11730
|
}
|
|
11692
|
-
if (key in el &&
|
|
11731
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
11693
11732
|
return true;
|
|
11694
11733
|
}
|
|
11695
11734
|
return false;
|
|
@@ -11706,7 +11745,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11706
11745
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11707
11746
|
return false;
|
|
11708
11747
|
}
|
|
11709
|
-
if (
|
|
11748
|
+
if (key === "width" || key === "height") {
|
|
11749
|
+
const tag = el.tagName;
|
|
11750
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
11751
|
+
}
|
|
11752
|
+
if (isNativeOn(key) && isString(value)) {
|
|
11710
11753
|
return false;
|
|
11711
11754
|
}
|
|
11712
11755
|
return key in el;
|
|
@@ -12197,21 +12240,20 @@ const vModelText = {
|
|
|
12197
12240
|
el[assignKey] = getModelAssigner(vnode);
|
|
12198
12241
|
if (el.composing)
|
|
12199
12242
|
return;
|
|
12243
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12244
|
+
const newValue = value == null ? "" : value;
|
|
12245
|
+
if (elValue === newValue) {
|
|
12246
|
+
return;
|
|
12247
|
+
}
|
|
12200
12248
|
if (document.activeElement === el && el.type !== "range") {
|
|
12201
12249
|
if (lazy) {
|
|
12202
12250
|
return;
|
|
12203
12251
|
}
|
|
12204
|
-
if (trim && el.value.trim() ===
|
|
12205
|
-
return;
|
|
12206
|
-
}
|
|
12207
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
12252
|
+
if (trim && el.value.trim() === newValue) {
|
|
12208
12253
|
return;
|
|
12209
12254
|
}
|
|
12210
12255
|
}
|
|
12211
|
-
|
|
12212
|
-
if (el.value !== newValue) {
|
|
12213
|
-
el.value = newValue;
|
|
12214
|
-
}
|
|
12256
|
+
el.value = newValue;
|
|
12215
12257
|
}
|
|
12216
12258
|
};
|
|
12217
12259
|
const vModelCheckbox = {
|
|
@@ -12431,14 +12473,14 @@ const modifierGuards = {
|
|
|
12431
12473
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12432
12474
|
};
|
|
12433
12475
|
const withModifiers = (fn, modifiers) => {
|
|
12434
|
-
return (event, ...args) => {
|
|
12476
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
12435
12477
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12436
12478
|
const guard = modifierGuards[modifiers[i]];
|
|
12437
12479
|
if (guard && guard(event, modifiers))
|
|
12438
12480
|
return;
|
|
12439
12481
|
}
|
|
12440
12482
|
return fn(event, ...args);
|
|
12441
|
-
};
|
|
12483
|
+
});
|
|
12442
12484
|
};
|
|
12443
12485
|
const keyNames = {
|
|
12444
12486
|
esc: "escape",
|
|
@@ -12466,7 +12508,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12466
12508
|
);
|
|
12467
12509
|
}
|
|
12468
12510
|
}
|
|
12469
|
-
return (event) => {
|
|
12511
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
12470
12512
|
if (!("key" in event)) {
|
|
12471
12513
|
return;
|
|
12472
12514
|
}
|
|
@@ -12494,7 +12536,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12494
12536
|
}
|
|
12495
12537
|
}
|
|
12496
12538
|
}
|
|
12497
|
-
};
|
|
12539
|
+
});
|
|
12498
12540
|
};
|
|
12499
12541
|
|
|
12500
12542
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -13379,6 +13421,7 @@ function getMemoedVNodeCall(node) {
|
|
|
13379
13421
|
return node;
|
|
13380
13422
|
}
|
|
13381
13423
|
}
|
|
13424
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13382
13425
|
|
|
13383
13426
|
const deprecationData = {
|
|
13384
13427
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -15777,7 +15820,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
15777
15820
|
onExit();
|
|
15778
15821
|
};
|
|
15779
15822
|
}
|
|
15780
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
15781
15823
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
15782
15824
|
const stripParensRE = /^\(|\)$/g;
|
|
15783
15825
|
function parseForExpression(input, context) {
|
|
@@ -16321,6 +16363,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16321
16363
|
if (isEventHandler && isReservedProp(name)) {
|
|
16322
16364
|
hasVnodeHook = true;
|
|
16323
16365
|
}
|
|
16366
|
+
if (isEventHandler && value.type === 14) {
|
|
16367
|
+
value = value.arguments[0];
|
|
16368
|
+
}
|
|
16324
16369
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
16325
16370
|
return;
|
|
16326
16371
|
}
|
|
@@ -16377,7 +16422,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16377
16422
|
)
|
|
16378
16423
|
);
|
|
16379
16424
|
} else {
|
|
16380
|
-
const { name, arg, exp, loc } = prop;
|
|
16425
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
16381
16426
|
const isVBind = name === "bind";
|
|
16382
16427
|
const isVOn = name === "on";
|
|
16383
16428
|
if (name === "slot") {
|
|
@@ -16470,6 +16515,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16470
16515
|
}
|
|
16471
16516
|
continue;
|
|
16472
16517
|
}
|
|
16518
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
16519
|
+
patchFlag |= 32;
|
|
16520
|
+
}
|
|
16473
16521
|
const directiveTransform = context.directiveTransforms[name];
|
|
16474
16522
|
if (directiveTransform) {
|
|
16475
16523
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -17502,8 +17550,8 @@ const transformModel = (dir, node, context) => {
|
|
|
17502
17550
|
);
|
|
17503
17551
|
}
|
|
17504
17552
|
function checkDuplicatedValue() {
|
|
17505
|
-
const value =
|
|
17506
|
-
if (value) {
|
|
17553
|
+
const value = findDir(node, "bind");
|
|
17554
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
17507
17555
|
context.onError(
|
|
17508
17556
|
createDOMCompilerError(
|
|
17509
17557
|
60,
|
package/dist/vue.global.js
CHANGED
|
@@ -15,8 +15,8 @@ var Vue = (function () {
|
|
|
15
15
|
const NOOP = () => {
|
|
16
16
|
};
|
|
17
17
|
const NO = () => false;
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
19
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
20
20
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
21
21
|
const extend = Object.assign;
|
|
22
22
|
const remove = (arr, el) => {
|
|
@@ -107,7 +107,7 @@ var Vue = (function () {
|
|
|
107
107
|
[4]: `STYLE`,
|
|
108
108
|
[8]: `PROPS`,
|
|
109
109
|
[16]: `FULL_PROPS`,
|
|
110
|
-
[32]: `
|
|
110
|
+
[32]: `NEED_HYDRATION`,
|
|
111
111
|
[64]: `STABLE_FRAGMENT`,
|
|
112
112
|
[128]: `KEYED_FRAGMENT`,
|
|
113
113
|
[256]: `UNKEYED_FRAGMENT`,
|
|
@@ -1004,7 +1004,7 @@ var Vue = (function () {
|
|
|
1004
1004
|
toRaw(this)
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
return type === "delete" ? false : this;
|
|
1007
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
1010
|
function createInstrumentations() {
|
|
@@ -2732,9 +2732,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2732
2732
|
try {
|
|
2733
2733
|
if (vnode.shapeFlag & 4) {
|
|
2734
2734
|
const proxyToUse = withProxy || proxy;
|
|
2735
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2736
|
+
get(target, key, receiver) {
|
|
2737
|
+
warn(
|
|
2738
|
+
`Property '${String(
|
|
2739
|
+
key
|
|
2740
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2741
|
+
);
|
|
2742
|
+
return Reflect.get(target, key, receiver);
|
|
2743
|
+
}
|
|
2744
|
+
}) : proxyToUse;
|
|
2735
2745
|
result = normalizeVNode(
|
|
2736
2746
|
render.call(
|
|
2737
|
-
|
|
2747
|
+
thisProxy,
|
|
2738
2748
|
proxyToUse,
|
|
2739
2749
|
renderCache,
|
|
2740
2750
|
props,
|
|
@@ -3365,7 +3375,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3365
3375
|
if (delayEnter) {
|
|
3366
3376
|
activeBranch.transition.afterLeave = () => {
|
|
3367
3377
|
if (pendingId === suspense.pendingId) {
|
|
3368
|
-
move(
|
|
3378
|
+
move(
|
|
3379
|
+
pendingBranch,
|
|
3380
|
+
container2,
|
|
3381
|
+
next(activeBranch),
|
|
3382
|
+
0
|
|
3383
|
+
);
|
|
3369
3384
|
queuePostFlushCb(effects);
|
|
3370
3385
|
}
|
|
3371
3386
|
};
|
|
@@ -3412,7 +3427,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3412
3427
|
}
|
|
3413
3428
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
3414
3429
|
triggerEvent(vnode2, "onFallback");
|
|
3415
|
-
const anchor2 = next(activeBranch);
|
|
3416
3430
|
const mountFallback = () => {
|
|
3417
3431
|
if (!suspense.isInFallback) {
|
|
3418
3432
|
return;
|
|
@@ -3421,7 +3435,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3421
3435
|
null,
|
|
3422
3436
|
fallbackVNode,
|
|
3423
3437
|
container2,
|
|
3424
|
-
|
|
3438
|
+
next(activeBranch),
|
|
3425
3439
|
parentComponent2,
|
|
3426
3440
|
null,
|
|
3427
3441
|
// fallback tree will not have suspense context
|
|
@@ -3764,6 +3778,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3764
3778
|
let onCleanup = (fn) => {
|
|
3765
3779
|
cleanup = effect.onStop = () => {
|
|
3766
3780
|
callWithErrorHandling(fn, instance, 4);
|
|
3781
|
+
cleanup = effect.onStop = void 0;
|
|
3767
3782
|
};
|
|
3768
3783
|
};
|
|
3769
3784
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -4240,7 +4255,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4240
4255
|
}
|
|
4241
4256
|
}
|
|
4242
4257
|
function getKeepAliveChild(vnode) {
|
|
4243
|
-
return isKeepAlive(vnode) ?
|
|
4258
|
+
return isKeepAlive(vnode) ? (
|
|
4259
|
+
// #7121 ensure get the child component subtree in case
|
|
4260
|
+
// it's been replaced during HMR
|
|
4261
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
4262
|
+
) : vnode;
|
|
4244
4263
|
}
|
|
4245
4264
|
function setTransitionHooks(vnode, hooks) {
|
|
4246
4265
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6257,7 +6276,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6257
6276
|
return vm;
|
|
6258
6277
|
}
|
|
6259
6278
|
}
|
|
6260
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6279
|
+
Vue.version = `2.6.14-compat:${"3.3.10"}`;
|
|
6261
6280
|
Vue.config = singletonApp.config;
|
|
6262
6281
|
Vue.use = (p, ...options) => {
|
|
6263
6282
|
if (p && isFunction(p.install)) {
|
|
@@ -7285,6 +7304,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7285
7304
|
};
|
|
7286
7305
|
}
|
|
7287
7306
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7307
|
+
if (expectedTypes.length === 0) {
|
|
7308
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7309
|
+
}
|
|
7288
7310
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7289
7311
|
const expectedType = expectedTypes[0];
|
|
7290
7312
|
const receivedType = toRawType(value);
|
|
@@ -7556,6 +7578,20 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7556
7578
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7557
7579
|
let domType = node.nodeType;
|
|
7558
7580
|
vnode.el = node;
|
|
7581
|
+
{
|
|
7582
|
+
if (!("__vnode" in node)) {
|
|
7583
|
+
Object.defineProperty(node, "__vnode", {
|
|
7584
|
+
value: vnode,
|
|
7585
|
+
enumerable: false
|
|
7586
|
+
});
|
|
7587
|
+
}
|
|
7588
|
+
if (!("__vueParentComponent" in node)) {
|
|
7589
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
7590
|
+
value: parentComponent,
|
|
7591
|
+
enumerable: false
|
|
7592
|
+
});
|
|
7593
|
+
}
|
|
7594
|
+
}
|
|
7559
7595
|
if (patchFlag === -2) {
|
|
7560
7596
|
optimized = false;
|
|
7561
7597
|
vnode.dynamicChildren = null;
|
|
@@ -7717,15 +7753,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7717
7753
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7718
7754
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7719
7755
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7720
|
-
const
|
|
7756
|
+
const forcePatch = type === "input" || type === "option";
|
|
7721
7757
|
{
|
|
7722
7758
|
if (dirs) {
|
|
7723
7759
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7724
7760
|
}
|
|
7725
7761
|
if (props) {
|
|
7726
|
-
if (
|
|
7762
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7727
7763
|
for (const key in props) {
|
|
7728
|
-
if (
|
|
7764
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7765
|
+
key[0] === ".") {
|
|
7729
7766
|
patchProp(
|
|
7730
7767
|
el,
|
|
7731
7768
|
key,
|
|
@@ -9516,6 +9553,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9516
9553
|
}
|
|
9517
9554
|
};
|
|
9518
9555
|
const TeleportImpl = {
|
|
9556
|
+
name: "Teleport",
|
|
9519
9557
|
__isTeleport: true,
|
|
9520
9558
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
9521
9559
|
const {
|
|
@@ -9995,7 +10033,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9995
10033
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
9996
10034
|
type = toRaw(type);
|
|
9997
10035
|
warn(
|
|
9998
|
-
`Vue received a Component
|
|
10036
|
+
`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\`.`,
|
|
9999
10037
|
`
|
|
10000
10038
|
Component that was made reactive: `,
|
|
10001
10039
|
type
|
|
@@ -10629,9 +10667,9 @@ Component that was made reactive: `,
|
|
|
10629
10667
|
return;
|
|
10630
10668
|
}
|
|
10631
10669
|
const vueStyle = { style: "color:#3ba776" };
|
|
10632
|
-
const numberStyle = { style: "color:#
|
|
10633
|
-
const stringStyle = { style: "color:#
|
|
10634
|
-
const keywordStyle = { style: "color:#
|
|
10670
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
10671
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
10672
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
10635
10673
|
const formatter = {
|
|
10636
10674
|
header(obj) {
|
|
10637
10675
|
if (!isObject(obj)) {
|
|
@@ -10825,7 +10863,7 @@ Component that was made reactive: `,
|
|
|
10825
10863
|
return true;
|
|
10826
10864
|
}
|
|
10827
10865
|
|
|
10828
|
-
const version = "3.3.
|
|
10866
|
+
const version = "3.3.10";
|
|
10829
10867
|
const ssrUtils = null;
|
|
10830
10868
|
const resolveFilter = resolveFilter$1 ;
|
|
10831
10869
|
const _compatUtils = {
|
|
@@ -11524,7 +11562,8 @@ Component that was made reactive: `,
|
|
|
11524
11562
|
}
|
|
11525
11563
|
}
|
|
11526
11564
|
|
|
11527
|
-
const
|
|
11565
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11566
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11528
11567
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11529
11568
|
if (key === "class") {
|
|
11530
11569
|
patchClass(el, nextValue, isSVG);
|
|
@@ -11558,7 +11597,7 @@ Component that was made reactive: `,
|
|
|
11558
11597
|
if (key === "innerHTML" || key === "textContent") {
|
|
11559
11598
|
return true;
|
|
11560
11599
|
}
|
|
11561
|
-
if (key in el &&
|
|
11600
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
11562
11601
|
return true;
|
|
11563
11602
|
}
|
|
11564
11603
|
return false;
|
|
@@ -11575,7 +11614,11 @@ Component that was made reactive: `,
|
|
|
11575
11614
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11576
11615
|
return false;
|
|
11577
11616
|
}
|
|
11578
|
-
if (
|
|
11617
|
+
if (key === "width" || key === "height") {
|
|
11618
|
+
const tag = el.tagName;
|
|
11619
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
11620
|
+
}
|
|
11621
|
+
if (isNativeOn(key) && isString(value)) {
|
|
11579
11622
|
return false;
|
|
11580
11623
|
}
|
|
11581
11624
|
return key in el;
|
|
@@ -12054,21 +12097,20 @@ Component that was made reactive: `,
|
|
|
12054
12097
|
el[assignKey] = getModelAssigner(vnode);
|
|
12055
12098
|
if (el.composing)
|
|
12056
12099
|
return;
|
|
12100
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12101
|
+
const newValue = value == null ? "" : value;
|
|
12102
|
+
if (elValue === newValue) {
|
|
12103
|
+
return;
|
|
12104
|
+
}
|
|
12057
12105
|
if (document.activeElement === el && el.type !== "range") {
|
|
12058
12106
|
if (lazy) {
|
|
12059
12107
|
return;
|
|
12060
12108
|
}
|
|
12061
|
-
if (trim && el.value.trim() ===
|
|
12062
|
-
return;
|
|
12063
|
-
}
|
|
12064
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
12109
|
+
if (trim && el.value.trim() === newValue) {
|
|
12065
12110
|
return;
|
|
12066
12111
|
}
|
|
12067
12112
|
}
|
|
12068
|
-
|
|
12069
|
-
if (el.value !== newValue) {
|
|
12070
|
-
el.value = newValue;
|
|
12071
|
-
}
|
|
12113
|
+
el.value = newValue;
|
|
12072
12114
|
}
|
|
12073
12115
|
};
|
|
12074
12116
|
const vModelCheckbox = {
|
|
@@ -12254,14 +12296,14 @@ Component that was made reactive: `,
|
|
|
12254
12296
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12255
12297
|
};
|
|
12256
12298
|
const withModifiers = (fn, modifiers) => {
|
|
12257
|
-
return (event, ...args) => {
|
|
12299
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
12258
12300
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12259
12301
|
const guard = modifierGuards[modifiers[i]];
|
|
12260
12302
|
if (guard && guard(event, modifiers))
|
|
12261
12303
|
return;
|
|
12262
12304
|
}
|
|
12263
12305
|
return fn(event, ...args);
|
|
12264
|
-
};
|
|
12306
|
+
});
|
|
12265
12307
|
};
|
|
12266
12308
|
const keyNames = {
|
|
12267
12309
|
esc: "escape",
|
|
@@ -12289,7 +12331,7 @@ Component that was made reactive: `,
|
|
|
12289
12331
|
);
|
|
12290
12332
|
}
|
|
12291
12333
|
}
|
|
12292
|
-
return (event) => {
|
|
12334
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
12293
12335
|
if (!("key" in event)) {
|
|
12294
12336
|
return;
|
|
12295
12337
|
}
|
|
@@ -12317,7 +12359,7 @@ Component that was made reactive: `,
|
|
|
12317
12359
|
}
|
|
12318
12360
|
}
|
|
12319
12361
|
}
|
|
12320
|
-
};
|
|
12362
|
+
});
|
|
12321
12363
|
};
|
|
12322
12364
|
|
|
12323
12365
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -13201,6 +13243,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13201
13243
|
return node;
|
|
13202
13244
|
}
|
|
13203
13245
|
}
|
|
13246
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13204
13247
|
|
|
13205
13248
|
const deprecationData = {
|
|
13206
13249
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -15598,7 +15641,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15598
15641
|
onExit();
|
|
15599
15642
|
};
|
|
15600
15643
|
}
|
|
15601
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
15602
15644
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
15603
15645
|
const stripParensRE = /^\(|\)$/g;
|
|
15604
15646
|
function parseForExpression(input, context) {
|
|
@@ -16140,6 +16182,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16140
16182
|
if (isEventHandler && isReservedProp(name)) {
|
|
16141
16183
|
hasVnodeHook = true;
|
|
16142
16184
|
}
|
|
16185
|
+
if (isEventHandler && value.type === 14) {
|
|
16186
|
+
value = value.arguments[0];
|
|
16187
|
+
}
|
|
16143
16188
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
16144
16189
|
return;
|
|
16145
16190
|
}
|
|
@@ -16196,7 +16241,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16196
16241
|
)
|
|
16197
16242
|
);
|
|
16198
16243
|
} else {
|
|
16199
|
-
const { name, arg, exp, loc } = prop;
|
|
16244
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
16200
16245
|
const isVBind = name === "bind";
|
|
16201
16246
|
const isVOn = name === "on";
|
|
16202
16247
|
if (name === "slot") {
|
|
@@ -16289,6 +16334,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16289
16334
|
}
|
|
16290
16335
|
continue;
|
|
16291
16336
|
}
|
|
16337
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
16338
|
+
patchFlag |= 32;
|
|
16339
|
+
}
|
|
16292
16340
|
const directiveTransform = context.directiveTransforms[name];
|
|
16293
16341
|
if (directiveTransform) {
|
|
16294
16342
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -17321,8 +17369,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17321
17369
|
);
|
|
17322
17370
|
}
|
|
17323
17371
|
function checkDuplicatedValue() {
|
|
17324
|
-
const value =
|
|
17325
|
-
if (value) {
|
|
17372
|
+
const value = findDir(node, "bind");
|
|
17373
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
17326
17374
|
context.onError(
|
|
17327
17375
|
createDOMCompilerError(
|
|
17328
17376
|
60,
|