@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.cjs.js
CHANGED
|
@@ -18,8 +18,8 @@ const EMPTY_ARR = Object.freeze([]) ;
|
|
|
18
18
|
const NOOP = () => {
|
|
19
19
|
};
|
|
20
20
|
const NO = () => false;
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
22
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
23
23
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
24
24
|
const extend = Object.assign;
|
|
25
25
|
const remove = (arr, el) => {
|
|
@@ -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,
|
|
@@ -3435,7 +3445,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3435
3445
|
if (delayEnter) {
|
|
3436
3446
|
activeBranch.transition.afterLeave = () => {
|
|
3437
3447
|
if (pendingId === suspense.pendingId) {
|
|
3438
|
-
move(
|
|
3448
|
+
move(
|
|
3449
|
+
pendingBranch,
|
|
3450
|
+
container2,
|
|
3451
|
+
next(activeBranch),
|
|
3452
|
+
0
|
|
3453
|
+
);
|
|
3439
3454
|
queuePostFlushCb(effects);
|
|
3440
3455
|
}
|
|
3441
3456
|
};
|
|
@@ -3482,7 +3497,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3482
3497
|
}
|
|
3483
3498
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
3484
3499
|
triggerEvent(vnode2, "onFallback");
|
|
3485
|
-
const anchor2 = next(activeBranch);
|
|
3486
3500
|
const mountFallback = () => {
|
|
3487
3501
|
if (!suspense.isInFallback) {
|
|
3488
3502
|
return;
|
|
@@ -3491,7 +3505,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3491
3505
|
null,
|
|
3492
3506
|
fallbackVNode,
|
|
3493
3507
|
container2,
|
|
3494
|
-
|
|
3508
|
+
next(activeBranch),
|
|
3495
3509
|
parentComponent2,
|
|
3496
3510
|
null,
|
|
3497
3511
|
// fallback tree will not have suspense context
|
|
@@ -3834,6 +3848,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3834
3848
|
let onCleanup = (fn) => {
|
|
3835
3849
|
cleanup = effect.onStop = () => {
|
|
3836
3850
|
callWithErrorHandling(fn, instance, 4);
|
|
3851
|
+
cleanup = effect.onStop = void 0;
|
|
3837
3852
|
};
|
|
3838
3853
|
};
|
|
3839
3854
|
let ssrCleanup;
|
|
@@ -4331,7 +4346,11 @@ function emptyPlaceholder(vnode) {
|
|
|
4331
4346
|
}
|
|
4332
4347
|
}
|
|
4333
4348
|
function getKeepAliveChild(vnode) {
|
|
4334
|
-
return isKeepAlive(vnode) ?
|
|
4349
|
+
return isKeepAlive(vnode) ? (
|
|
4350
|
+
// #7121 ensure get the child component subtree in case
|
|
4351
|
+
// it's been replaced during HMR
|
|
4352
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
4353
|
+
) : vnode;
|
|
4335
4354
|
}
|
|
4336
4355
|
function setTransitionHooks(vnode, hooks) {
|
|
4337
4356
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6354,7 +6373,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6354
6373
|
return vm;
|
|
6355
6374
|
}
|
|
6356
6375
|
}
|
|
6357
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6376
|
+
Vue.version = `2.6.14-compat:${"3.3.10"}`;
|
|
6358
6377
|
Vue.config = singletonApp.config;
|
|
6359
6378
|
Vue.use = (p, ...options) => {
|
|
6360
6379
|
if (p && isFunction(p.install)) {
|
|
@@ -7382,6 +7401,9 @@ function assertType(value, type) {
|
|
|
7382
7401
|
};
|
|
7383
7402
|
}
|
|
7384
7403
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7404
|
+
if (expectedTypes.length === 0) {
|
|
7405
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7406
|
+
}
|
|
7385
7407
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7386
7408
|
const expectedType = expectedTypes[0];
|
|
7387
7409
|
const receivedType = toRawType(value);
|
|
@@ -7653,6 +7675,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7653
7675
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7654
7676
|
let domType = node.nodeType;
|
|
7655
7677
|
vnode.el = node;
|
|
7678
|
+
{
|
|
7679
|
+
if (!("__vnode" in node)) {
|
|
7680
|
+
Object.defineProperty(node, "__vnode", {
|
|
7681
|
+
value: vnode,
|
|
7682
|
+
enumerable: false
|
|
7683
|
+
});
|
|
7684
|
+
}
|
|
7685
|
+
if (!("__vueParentComponent" in node)) {
|
|
7686
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
7687
|
+
value: parentComponent,
|
|
7688
|
+
enumerable: false
|
|
7689
|
+
});
|
|
7690
|
+
}
|
|
7691
|
+
}
|
|
7656
7692
|
if (patchFlag === -2) {
|
|
7657
7693
|
optimized = false;
|
|
7658
7694
|
vnode.dynamicChildren = null;
|
|
@@ -7814,15 +7850,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7814
7850
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7815
7851
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7816
7852
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7817
|
-
const
|
|
7853
|
+
const forcePatch = type === "input" || type === "option";
|
|
7818
7854
|
{
|
|
7819
7855
|
if (dirs) {
|
|
7820
7856
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7821
7857
|
}
|
|
7822
7858
|
if (props) {
|
|
7823
|
-
if (
|
|
7859
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7824
7860
|
for (const key in props) {
|
|
7825
|
-
if (
|
|
7861
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7862
|
+
key[0] === ".") {
|
|
7826
7863
|
patchProp(
|
|
7827
7864
|
el,
|
|
7828
7865
|
key,
|
|
@@ -9613,6 +9650,7 @@ const resolveTarget = (props, select) => {
|
|
|
9613
9650
|
}
|
|
9614
9651
|
};
|
|
9615
9652
|
const TeleportImpl = {
|
|
9653
|
+
name: "Teleport",
|
|
9616
9654
|
__isTeleport: true,
|
|
9617
9655
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
9618
9656
|
const {
|
|
@@ -10092,7 +10130,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
10092
10130
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
10093
10131
|
type = toRaw(type);
|
|
10094
10132
|
warn(
|
|
10095
|
-
`Vue received a Component
|
|
10133
|
+
`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
10134
|
`
|
|
10097
10135
|
Component that was made reactive: `,
|
|
10098
10136
|
type
|
|
@@ -10744,9 +10782,9 @@ function initCustomFormatter() {
|
|
|
10744
10782
|
return;
|
|
10745
10783
|
}
|
|
10746
10784
|
const vueStyle = { style: "color:#3ba776" };
|
|
10747
|
-
const numberStyle = { style: "color:#
|
|
10748
|
-
const stringStyle = { style: "color:#
|
|
10749
|
-
const keywordStyle = { style: "color:#
|
|
10785
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
10786
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
10787
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
10750
10788
|
const formatter = {
|
|
10751
10789
|
header(obj) {
|
|
10752
10790
|
if (!isObject(obj)) {
|
|
@@ -10940,7 +10978,7 @@ function isMemoSame(cached, memo) {
|
|
|
10940
10978
|
return true;
|
|
10941
10979
|
}
|
|
10942
10980
|
|
|
10943
|
-
const version = "3.3.
|
|
10981
|
+
const version = "3.3.10";
|
|
10944
10982
|
const _ssrUtils = {
|
|
10945
10983
|
createComponentInstance,
|
|
10946
10984
|
setupComponent,
|
|
@@ -11654,7 +11692,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
11654
11692
|
}
|
|
11655
11693
|
}
|
|
11656
11694
|
|
|
11657
|
-
const
|
|
11695
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11696
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11658
11697
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11659
11698
|
if (key === "class") {
|
|
11660
11699
|
patchClass(el, nextValue, isSVG);
|
|
@@ -11688,7 +11727,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11688
11727
|
if (key === "innerHTML" || key === "textContent") {
|
|
11689
11728
|
return true;
|
|
11690
11729
|
}
|
|
11691
|
-
if (key in el &&
|
|
11730
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
11692
11731
|
return true;
|
|
11693
11732
|
}
|
|
11694
11733
|
return false;
|
|
@@ -11705,7 +11744,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11705
11744
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11706
11745
|
return false;
|
|
11707
11746
|
}
|
|
11708
|
-
if (
|
|
11747
|
+
if (key === "width" || key === "height") {
|
|
11748
|
+
const tag = el.tagName;
|
|
11749
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
11750
|
+
}
|
|
11751
|
+
if (isNativeOn(key) && isString(value)) {
|
|
11709
11752
|
return false;
|
|
11710
11753
|
}
|
|
11711
11754
|
return key in el;
|
|
@@ -12141,21 +12184,20 @@ const vModelText = {
|
|
|
12141
12184
|
el[assignKey] = getModelAssigner(vnode);
|
|
12142
12185
|
if (el.composing)
|
|
12143
12186
|
return;
|
|
12187
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12188
|
+
const newValue = value == null ? "" : value;
|
|
12189
|
+
if (elValue === newValue) {
|
|
12190
|
+
return;
|
|
12191
|
+
}
|
|
12144
12192
|
if (document.activeElement === el && el.type !== "range") {
|
|
12145
12193
|
if (lazy) {
|
|
12146
12194
|
return;
|
|
12147
12195
|
}
|
|
12148
|
-
if (trim && el.value.trim() ===
|
|
12196
|
+
if (trim && el.value.trim() === newValue) {
|
|
12149
12197
|
return;
|
|
12150
12198
|
}
|
|
12151
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
12152
|
-
return;
|
|
12153
|
-
}
|
|
12154
|
-
}
|
|
12155
|
-
const newValue = value == null ? "" : value;
|
|
12156
|
-
if (el.value !== newValue) {
|
|
12157
|
-
el.value = newValue;
|
|
12158
12199
|
}
|
|
12200
|
+
el.value = newValue;
|
|
12159
12201
|
}
|
|
12160
12202
|
};
|
|
12161
12203
|
const vModelCheckbox = {
|
|
@@ -12375,14 +12417,14 @@ const modifierGuards = {
|
|
|
12375
12417
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12376
12418
|
};
|
|
12377
12419
|
const withModifiers = (fn, modifiers) => {
|
|
12378
|
-
return (event, ...args) => {
|
|
12420
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
12379
12421
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12380
12422
|
const guard = modifierGuards[modifiers[i]];
|
|
12381
12423
|
if (guard && guard(event, modifiers))
|
|
12382
12424
|
return;
|
|
12383
12425
|
}
|
|
12384
12426
|
return fn(event, ...args);
|
|
12385
|
-
};
|
|
12427
|
+
});
|
|
12386
12428
|
};
|
|
12387
12429
|
const keyNames = {
|
|
12388
12430
|
esc: "escape",
|
|
@@ -12410,7 +12452,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12410
12452
|
);
|
|
12411
12453
|
}
|
|
12412
12454
|
}
|
|
12413
|
-
return (event) => {
|
|
12455
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
12414
12456
|
if (!("key" in event)) {
|
|
12415
12457
|
return;
|
|
12416
12458
|
}
|
|
@@ -12438,7 +12480,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12438
12480
|
}
|
|
12439
12481
|
}
|
|
12440
12482
|
}
|
|
12441
|
-
};
|
|
12483
|
+
});
|
|
12442
12484
|
};
|
|
12443
12485
|
|
|
12444
12486
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -13301,6 +13343,7 @@ function getMemoedVNodeCall(node) {
|
|
|
13301
13343
|
return node;
|
|
13302
13344
|
}
|
|
13303
13345
|
}
|
|
13346
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13304
13347
|
|
|
13305
13348
|
const deprecationData = {
|
|
13306
13349
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -15551,6 +15594,15 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
15551
15594
|
if (stmt.declare || !stmt.id)
|
|
15552
15595
|
continue;
|
|
15553
15596
|
onIdent(stmt.id);
|
|
15597
|
+
} else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
|
|
15598
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
15599
|
+
if (variable && variable.type === "VariableDeclaration") {
|
|
15600
|
+
for (const decl of variable.declarations) {
|
|
15601
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
15602
|
+
onIdent(id);
|
|
15603
|
+
}
|
|
15604
|
+
}
|
|
15605
|
+
}
|
|
15554
15606
|
}
|
|
15555
15607
|
}
|
|
15556
15608
|
}
|
|
@@ -16341,7 +16393,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
16341
16393
|
onExit();
|
|
16342
16394
|
};
|
|
16343
16395
|
}
|
|
16344
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
16345
16396
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
16346
16397
|
const stripParensRE = /^\(|\)$/g;
|
|
16347
16398
|
function parseForExpression(input, context) {
|
|
@@ -16915,6 +16966,10 @@ function resolveSetupReference(name, context) {
|
|
|
16915
16966
|
`${context.helperString(UNREF)}(${fromMaybeRef})`
|
|
16916
16967
|
) : `$setup[${JSON.stringify(fromMaybeRef)}]`;
|
|
16917
16968
|
}
|
|
16969
|
+
const fromProps = checkType("props");
|
|
16970
|
+
if (fromProps) {
|
|
16971
|
+
return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`;
|
|
16972
|
+
}
|
|
16918
16973
|
}
|
|
16919
16974
|
function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
|
|
16920
16975
|
const { tag, loc: elementLoc, children } = node;
|
|
@@ -16955,6 +17010,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
16955
17010
|
if (isEventHandler && isReservedProp(name)) {
|
|
16956
17011
|
hasVnodeHook = true;
|
|
16957
17012
|
}
|
|
17013
|
+
if (isEventHandler && value.type === 14) {
|
|
17014
|
+
value = value.arguments[0];
|
|
17015
|
+
}
|
|
16958
17016
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
16959
17017
|
return;
|
|
16960
17018
|
}
|
|
@@ -17023,7 +17081,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17023
17081
|
)
|
|
17024
17082
|
);
|
|
17025
17083
|
} else {
|
|
17026
|
-
const { name, arg, exp, loc } = prop;
|
|
17084
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
17027
17085
|
const isVBind = name === "bind";
|
|
17028
17086
|
const isVOn = name === "on";
|
|
17029
17087
|
if (name === "slot") {
|
|
@@ -17116,6 +17174,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17116
17174
|
}
|
|
17117
17175
|
continue;
|
|
17118
17176
|
}
|
|
17177
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
17178
|
+
patchFlag |= 32;
|
|
17179
|
+
}
|
|
17119
17180
|
const directiveTransform = context.directiveTransforms[name];
|
|
17120
17181
|
if (directiveTransform) {
|
|
17121
17182
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -20525,8 +20586,8 @@ const transformModel = (dir, node, context) => {
|
|
|
20525
20586
|
);
|
|
20526
20587
|
}
|
|
20527
20588
|
function checkDuplicatedValue() {
|
|
20528
|
-
const value =
|
|
20529
|
-
if (value) {
|
|
20589
|
+
const value = findDir(node, "bind");
|
|
20590
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
20530
20591
|
context.onError(
|
|
20531
20592
|
createDOMCompilerError(
|
|
20532
20593
|
60,
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -18,8 +18,8 @@ const EMPTY_ARR = [];
|
|
|
18
18
|
const NOOP = () => {
|
|
19
19
|
};
|
|
20
20
|
const NO = () => false;
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
22
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
23
23
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
24
24
|
const extend = Object.assign;
|
|
25
25
|
const remove = (arr, el) => {
|
|
@@ -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,
|
|
@@ -2498,7 +2508,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2498
2508
|
if (delayEnter) {
|
|
2499
2509
|
activeBranch.transition.afterLeave = () => {
|
|
2500
2510
|
if (pendingId === suspense.pendingId) {
|
|
2501
|
-
move(
|
|
2511
|
+
move(
|
|
2512
|
+
pendingBranch,
|
|
2513
|
+
container2,
|
|
2514
|
+
next(activeBranch),
|
|
2515
|
+
0
|
|
2516
|
+
);
|
|
2502
2517
|
queuePostFlushCb(effects);
|
|
2503
2518
|
}
|
|
2504
2519
|
};
|
|
@@ -2545,7 +2560,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2545
2560
|
}
|
|
2546
2561
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
2547
2562
|
triggerEvent(vnode2, "onFallback");
|
|
2548
|
-
const anchor2 = next(activeBranch);
|
|
2549
2563
|
const mountFallback = () => {
|
|
2550
2564
|
if (!suspense.isInFallback) {
|
|
2551
2565
|
return;
|
|
@@ -2554,7 +2568,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2554
2568
|
null,
|
|
2555
2569
|
fallbackVNode,
|
|
2556
2570
|
container2,
|
|
2557
|
-
|
|
2571
|
+
next(activeBranch),
|
|
2558
2572
|
parentComponent2,
|
|
2559
2573
|
null,
|
|
2560
2574
|
// fallback tree will not have suspense context
|
|
@@ -2861,6 +2875,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
2861
2875
|
let onCleanup = (fn) => {
|
|
2862
2876
|
cleanup = effect.onStop = () => {
|
|
2863
2877
|
callWithErrorHandling(fn, instance, 4);
|
|
2878
|
+
cleanup = effect.onStop = void 0;
|
|
2864
2879
|
};
|
|
2865
2880
|
};
|
|
2866
2881
|
let ssrCleanup;
|
|
@@ -3338,7 +3353,11 @@ function emptyPlaceholder(vnode) {
|
|
|
3338
3353
|
}
|
|
3339
3354
|
}
|
|
3340
3355
|
function getKeepAliveChild(vnode) {
|
|
3341
|
-
return isKeepAlive(vnode) ?
|
|
3356
|
+
return isKeepAlive(vnode) ? (
|
|
3357
|
+
// #7121 ensure get the child component subtree in case
|
|
3358
|
+
// it's been replaced during HMR
|
|
3359
|
+
vnode.children ? vnode.children[0] : void 0
|
|
3360
|
+
) : vnode;
|
|
3342
3361
|
}
|
|
3343
3362
|
function setTransitionHooks(vnode, hooks) {
|
|
3344
3363
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -5072,7 +5091,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5072
5091
|
return vm;
|
|
5073
5092
|
}
|
|
5074
5093
|
}
|
|
5075
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
5094
|
+
Vue.version = `2.6.14-compat:${"3.3.10"}`;
|
|
5076
5095
|
Vue.config = singletonApp.config;
|
|
5077
5096
|
Vue.use = (p, ...options) => {
|
|
5078
5097
|
if (p && isFunction(p.install)) {
|
|
@@ -6253,15 +6272,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6253
6272
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6254
6273
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6255
6274
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6256
|
-
const
|
|
6257
|
-
if (
|
|
6275
|
+
const forcePatch = type === "input" || type === "option";
|
|
6276
|
+
if (forcePatch || patchFlag !== -1) {
|
|
6258
6277
|
if (dirs) {
|
|
6259
6278
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
6260
6279
|
}
|
|
6261
6280
|
if (props) {
|
|
6262
|
-
if (
|
|
6281
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
6263
6282
|
for (const key in props) {
|
|
6264
|
-
if (
|
|
6283
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
6284
|
+
key[0] === ".") {
|
|
6265
6285
|
patchProp(
|
|
6266
6286
|
el,
|
|
6267
6287
|
key,
|
|
@@ -7833,6 +7853,7 @@ const resolveTarget = (props, select) => {
|
|
|
7833
7853
|
}
|
|
7834
7854
|
};
|
|
7835
7855
|
const TeleportImpl = {
|
|
7856
|
+
name: "Teleport",
|
|
7836
7857
|
__isTeleport: true,
|
|
7837
7858
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
7838
7859
|
const {
|
|
@@ -8799,7 +8820,7 @@ function isMemoSame(cached, memo) {
|
|
|
8799
8820
|
return true;
|
|
8800
8821
|
}
|
|
8801
8822
|
|
|
8802
|
-
const version = "3.3.
|
|
8823
|
+
const version = "3.3.10";
|
|
8803
8824
|
const _ssrUtils = {
|
|
8804
8825
|
createComponentInstance,
|
|
8805
8826
|
setupComponent,
|
|
@@ -9491,7 +9512,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
9491
9512
|
}
|
|
9492
9513
|
}
|
|
9493
9514
|
|
|
9494
|
-
const
|
|
9515
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
9516
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
9495
9517
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
9496
9518
|
if (key === "class") {
|
|
9497
9519
|
patchClass(el, nextValue, isSVG);
|
|
@@ -9525,7 +9547,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9525
9547
|
if (key === "innerHTML" || key === "textContent") {
|
|
9526
9548
|
return true;
|
|
9527
9549
|
}
|
|
9528
|
-
if (key in el &&
|
|
9550
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
9529
9551
|
return true;
|
|
9530
9552
|
}
|
|
9531
9553
|
return false;
|
|
@@ -9542,7 +9564,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9542
9564
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9543
9565
|
return false;
|
|
9544
9566
|
}
|
|
9545
|
-
if (
|
|
9567
|
+
if (key === "width" || key === "height") {
|
|
9568
|
+
const tag = el.tagName;
|
|
9569
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
9570
|
+
}
|
|
9571
|
+
if (isNativeOn(key) && isString(value)) {
|
|
9546
9572
|
return false;
|
|
9547
9573
|
}
|
|
9548
9574
|
return key in el;
|
|
@@ -9954,21 +9980,20 @@ const vModelText = {
|
|
|
9954
9980
|
el[assignKey] = getModelAssigner(vnode);
|
|
9955
9981
|
if (el.composing)
|
|
9956
9982
|
return;
|
|
9983
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
9984
|
+
const newValue = value == null ? "" : value;
|
|
9985
|
+
if (elValue === newValue) {
|
|
9986
|
+
return;
|
|
9987
|
+
}
|
|
9957
9988
|
if (document.activeElement === el && el.type !== "range") {
|
|
9958
9989
|
if (lazy) {
|
|
9959
9990
|
return;
|
|
9960
9991
|
}
|
|
9961
|
-
if (trim && el.value.trim() ===
|
|
9962
|
-
return;
|
|
9963
|
-
}
|
|
9964
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
9992
|
+
if (trim && el.value.trim() === newValue) {
|
|
9965
9993
|
return;
|
|
9966
9994
|
}
|
|
9967
9995
|
}
|
|
9968
|
-
|
|
9969
|
-
if (el.value !== newValue) {
|
|
9970
|
-
el.value = newValue;
|
|
9971
|
-
}
|
|
9996
|
+
el.value = newValue;
|
|
9972
9997
|
}
|
|
9973
9998
|
};
|
|
9974
9999
|
const vModelCheckbox = {
|
|
@@ -10185,14 +10210,14 @@ const modifierGuards = {
|
|
|
10185
10210
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
10186
10211
|
};
|
|
10187
10212
|
const withModifiers = (fn, modifiers) => {
|
|
10188
|
-
return (event, ...args) => {
|
|
10213
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
10189
10214
|
for (let i = 0; i < modifiers.length; i++) {
|
|
10190
10215
|
const guard = modifierGuards[modifiers[i]];
|
|
10191
10216
|
if (guard && guard(event, modifiers))
|
|
10192
10217
|
return;
|
|
10193
10218
|
}
|
|
10194
10219
|
return fn(event, ...args);
|
|
10195
|
-
};
|
|
10220
|
+
});
|
|
10196
10221
|
};
|
|
10197
10222
|
const keyNames = {
|
|
10198
10223
|
esc: "escape",
|
|
@@ -10214,7 +10239,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10214
10239
|
}
|
|
10215
10240
|
}
|
|
10216
10241
|
}
|
|
10217
|
-
return (event) => {
|
|
10242
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
10218
10243
|
if (!("key" in event)) {
|
|
10219
10244
|
return;
|
|
10220
10245
|
}
|
|
@@ -10242,7 +10267,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10242
10267
|
}
|
|
10243
10268
|
}
|
|
10244
10269
|
}
|
|
10245
|
-
};
|
|
10270
|
+
});
|
|
10246
10271
|
};
|
|
10247
10272
|
|
|
10248
10273
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -11034,6 +11059,7 @@ function getMemoedVNodeCall(node) {
|
|
|
11034
11059
|
return node;
|
|
11035
11060
|
}
|
|
11036
11061
|
}
|
|
11062
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
11037
11063
|
|
|
11038
11064
|
function getCompatValue(key, context) {
|
|
11039
11065
|
const config = context.options ? context.options.compatConfig : context.compatConfig;
|
|
@@ -13163,6 +13189,15 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
13163
13189
|
if (stmt.declare || !stmt.id)
|
|
13164
13190
|
continue;
|
|
13165
13191
|
onIdent(stmt.id);
|
|
13192
|
+
} else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
|
|
13193
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
13194
|
+
if (variable && variable.type === "VariableDeclaration") {
|
|
13195
|
+
for (const decl of variable.declarations) {
|
|
13196
|
+
for (const id of extractIdentifiers(decl.id)) {
|
|
13197
|
+
onIdent(id);
|
|
13198
|
+
}
|
|
13199
|
+
}
|
|
13200
|
+
}
|
|
13166
13201
|
}
|
|
13167
13202
|
}
|
|
13168
13203
|
}
|
|
@@ -13942,7 +13977,6 @@ function processFor(node, dir, context, processCodegen) {
|
|
|
13942
13977
|
onExit();
|
|
13943
13978
|
};
|
|
13944
13979
|
}
|
|
13945
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13946
13980
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
13947
13981
|
const stripParensRE = /^\(|\)$/g;
|
|
13948
13982
|
function parseForExpression(input, context) {
|
|
@@ -14497,6 +14531,10 @@ function resolveSetupReference(name, context) {
|
|
|
14497
14531
|
`${context.helperString(UNREF)}(${fromMaybeRef})`
|
|
14498
14532
|
) : `$setup[${JSON.stringify(fromMaybeRef)}]`;
|
|
14499
14533
|
}
|
|
14534
|
+
const fromProps = checkType("props");
|
|
14535
|
+
if (fromProps) {
|
|
14536
|
+
return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`;
|
|
14537
|
+
}
|
|
14500
14538
|
}
|
|
14501
14539
|
function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
|
|
14502
14540
|
const { tag, loc: elementLoc, children } = node;
|
|
@@ -14537,6 +14575,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14537
14575
|
if (isEventHandler && isReservedProp(name)) {
|
|
14538
14576
|
hasVnodeHook = true;
|
|
14539
14577
|
}
|
|
14578
|
+
if (isEventHandler && value.type === 14) {
|
|
14579
|
+
value = value.arguments[0];
|
|
14580
|
+
}
|
|
14540
14581
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
14541
14582
|
return;
|
|
14542
14583
|
}
|
|
@@ -14605,7 +14646,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14605
14646
|
)
|
|
14606
14647
|
);
|
|
14607
14648
|
} else {
|
|
14608
|
-
const { name, arg, exp, loc } = prop;
|
|
14649
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
14609
14650
|
const isVBind = name === "bind";
|
|
14610
14651
|
const isVOn = name === "on";
|
|
14611
14652
|
if (name === "slot") {
|
|
@@ -14677,6 +14718,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14677
14718
|
}
|
|
14678
14719
|
continue;
|
|
14679
14720
|
}
|
|
14721
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
14722
|
+
patchFlag |= 32;
|
|
14723
|
+
}
|
|
14680
14724
|
const directiveTransform = context.directiveTransforms[name];
|
|
14681
14725
|
if (directiveTransform) {
|
|
14682
14726
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|