@vue/compat 3.4.5 → 3.4.7
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 +84 -40
- package/dist/vue.cjs.prod.js +42 -33
- package/dist/vue.esm-browser.js +84 -40
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.esm-bundler.js +84 -40
- package/dist/vue.global.js +84 -40
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +82 -37
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +82 -37
- package/dist/vue.runtime.global.js +82 -37
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -15
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1893,7 +1893,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
function flushPostFlushCbs(seen) {
|
|
1895
1895
|
if (pendingPostFlushCbs.length) {
|
|
1896
|
-
const deduped = [...new Set(pendingPostFlushCbs)]
|
|
1896
|
+
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
|
1897
|
+
(a, b) => getId(a) - getId(b)
|
|
1898
|
+
);
|
|
1897
1899
|
pendingPostFlushCbs.length = 0;
|
|
1898
1900
|
if (activePostFlushCbs) {
|
|
1899
1901
|
activePostFlushCbs.push(...deduped);
|
|
@@ -1903,7 +1905,6 @@ function flushPostFlushCbs(seen) {
|
|
|
1903
1905
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1904
1906
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1905
1907
|
}
|
|
1906
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
1907
1908
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1908
1909
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
|
1909
1910
|
continue;
|
|
@@ -3520,6 +3521,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3520
3521
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3521
3522
|
assertNumber(timeout, `Suspense timeout`);
|
|
3522
3523
|
}
|
|
3524
|
+
const initialAnchor = anchor;
|
|
3523
3525
|
const suspense = {
|
|
3524
3526
|
vnode,
|
|
3525
3527
|
parent: parentSuspense,
|
|
@@ -3527,7 +3529,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3527
3529
|
namespace,
|
|
3528
3530
|
container,
|
|
3529
3531
|
hiddenContainer,
|
|
3530
|
-
anchor,
|
|
3531
3532
|
deps: 0,
|
|
3532
3533
|
pendingId: suspenseId++,
|
|
3533
3534
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
@@ -3570,20 +3571,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3570
3571
|
move(
|
|
3571
3572
|
pendingBranch,
|
|
3572
3573
|
container2,
|
|
3573
|
-
next(activeBranch),
|
|
3574
|
+
anchor === initialAnchor ? next(activeBranch) : anchor,
|
|
3574
3575
|
0
|
|
3575
3576
|
);
|
|
3576
3577
|
queuePostFlushCb(effects);
|
|
3577
3578
|
}
|
|
3578
3579
|
};
|
|
3579
3580
|
}
|
|
3580
|
-
let { anchor: anchor2 } = suspense;
|
|
3581
3581
|
if (activeBranch) {
|
|
3582
|
-
|
|
3582
|
+
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
|
3583
|
+
anchor = next(activeBranch);
|
|
3584
|
+
}
|
|
3583
3585
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
3584
3586
|
}
|
|
3585
3587
|
if (!delayEnter) {
|
|
3586
|
-
move(pendingBranch, container2,
|
|
3588
|
+
move(pendingBranch, container2, anchor, 0);
|
|
3587
3589
|
}
|
|
3588
3590
|
}
|
|
3589
3591
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -4105,14 +4107,9 @@ function instanceWatch(source, value, options) {
|
|
|
4105
4107
|
cb = value.handler;
|
|
4106
4108
|
options = value;
|
|
4107
4109
|
}
|
|
4108
|
-
const
|
|
4109
|
-
setCurrentInstance(this);
|
|
4110
|
+
const reset = setCurrentInstance(this);
|
|
4110
4111
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4111
|
-
|
|
4112
|
-
setCurrentInstance(cur);
|
|
4113
|
-
} else {
|
|
4114
|
-
unsetCurrentInstance();
|
|
4115
|
-
}
|
|
4112
|
+
reset();
|
|
4116
4113
|
return res;
|
|
4117
4114
|
}
|
|
4118
4115
|
function createPathGetter(ctx, path) {
|
|
@@ -4164,12 +4161,11 @@ function validateDirectiveName(name) {
|
|
|
4164
4161
|
}
|
|
4165
4162
|
}
|
|
4166
4163
|
function withDirectives(vnode, directives) {
|
|
4167
|
-
|
|
4168
|
-
if (internalInstance === null) {
|
|
4164
|
+
if (currentRenderingInstance === null) {
|
|
4169
4165
|
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
|
4170
4166
|
return vnode;
|
|
4171
4167
|
}
|
|
4172
|
-
const instance = getExposeProxy(
|
|
4168
|
+
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
|
4173
4169
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
4174
4170
|
for (let i = 0; i < directives.length; i++) {
|
|
4175
4171
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -4966,9 +4962,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4966
4962
|
return;
|
|
4967
4963
|
}
|
|
4968
4964
|
pauseTracking();
|
|
4969
|
-
setCurrentInstance(target);
|
|
4965
|
+
const reset = setCurrentInstance(target);
|
|
4970
4966
|
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
4971
|
-
|
|
4967
|
+
reset();
|
|
4972
4968
|
resetTracking();
|
|
4973
4969
|
return res;
|
|
4974
4970
|
});
|
|
@@ -6562,7 +6558,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6562
6558
|
return vm;
|
|
6563
6559
|
}
|
|
6564
6560
|
}
|
|
6565
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6561
|
+
Vue.version = `2.6.14-compat:${"3.4.7"}`;
|
|
6566
6562
|
Vue.config = singletonApp.config;
|
|
6567
6563
|
Vue.use = (p, ...options) => {
|
|
6568
6564
|
if (p && isFunction(p.install)) {
|
|
@@ -7405,12 +7401,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
7405
7401
|
if (key in propsDefaults) {
|
|
7406
7402
|
value = propsDefaults[key];
|
|
7407
7403
|
} else {
|
|
7408
|
-
setCurrentInstance(instance);
|
|
7404
|
+
const reset = setCurrentInstance(instance);
|
|
7409
7405
|
value = propsDefaults[key] = defaultValue.call(
|
|
7410
7406
|
isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null,
|
|
7411
7407
|
props
|
|
7412
7408
|
);
|
|
7413
|
-
|
|
7409
|
+
reset();
|
|
7414
7410
|
}
|
|
7415
7411
|
} else {
|
|
7416
7412
|
value = defaultValue;
|
|
@@ -8110,7 +8106,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
8110
8106
|
if (props) {
|
|
8111
8107
|
if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
8112
8108
|
for (const key in props) {
|
|
8113
|
-
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key])) {
|
|
8109
|
+
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode)) {
|
|
8114
8110
|
hasMismatch = true;
|
|
8115
8111
|
}
|
|
8116
8112
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -8295,7 +8291,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8295
8291
|
};
|
|
8296
8292
|
return [hydrate, hydrateNode];
|
|
8297
8293
|
}
|
|
8298
|
-
function propHasMismatch(el, key, clientValue) {
|
|
8294
|
+
function propHasMismatch(el, key, clientValue, vnode) {
|
|
8299
8295
|
let mismatchType;
|
|
8300
8296
|
let mismatchKey;
|
|
8301
8297
|
let actual;
|
|
@@ -8307,14 +8303,23 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
8307
8303
|
mismatchType = mismatchKey = `class`;
|
|
8308
8304
|
}
|
|
8309
8305
|
} else if (key === "style") {
|
|
8310
|
-
actual = el.getAttribute("style");
|
|
8311
|
-
expected =
|
|
8312
|
-
|
|
8306
|
+
actual = toStyleMap(el.getAttribute("style") || "");
|
|
8307
|
+
expected = toStyleMap(
|
|
8308
|
+
isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
|
|
8309
|
+
);
|
|
8310
|
+
if (vnode.dirs) {
|
|
8311
|
+
for (const { dir, value } of vnode.dirs) {
|
|
8312
|
+
if (dir.name === "show" && !value) {
|
|
8313
|
+
expected.set("display", "none");
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
if (!isMapEqual(actual, expected)) {
|
|
8313
8318
|
mismatchType = mismatchKey = "style";
|
|
8314
8319
|
}
|
|
8315
8320
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8316
|
-
actual = el.hasAttribute(key)
|
|
8317
|
-
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ?
|
|
8321
|
+
actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
|
|
8322
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
|
|
8318
8323
|
if (actual !== expected) {
|
|
8319
8324
|
mismatchType = `attribute`;
|
|
8320
8325
|
mismatchKey = key;
|
|
@@ -8349,6 +8354,29 @@ function isSetEqual(a, b) {
|
|
|
8349
8354
|
}
|
|
8350
8355
|
return true;
|
|
8351
8356
|
}
|
|
8357
|
+
function toStyleMap(str) {
|
|
8358
|
+
const styleMap = /* @__PURE__ */ new Map();
|
|
8359
|
+
for (const item of str.split(";")) {
|
|
8360
|
+
let [key, value] = item.split(":");
|
|
8361
|
+
key = key == null ? void 0 : key.trim();
|
|
8362
|
+
value = value == null ? void 0 : value.trim();
|
|
8363
|
+
if (key && value) {
|
|
8364
|
+
styleMap.set(key, value);
|
|
8365
|
+
}
|
|
8366
|
+
}
|
|
8367
|
+
return styleMap;
|
|
8368
|
+
}
|
|
8369
|
+
function isMapEqual(a, b) {
|
|
8370
|
+
if (a.size !== b.size) {
|
|
8371
|
+
return false;
|
|
8372
|
+
}
|
|
8373
|
+
for (const [key, value] of a) {
|
|
8374
|
+
if (value !== b.get(key)) {
|
|
8375
|
+
return false;
|
|
8376
|
+
}
|
|
8377
|
+
}
|
|
8378
|
+
return true;
|
|
8379
|
+
}
|
|
8352
8380
|
|
|
8353
8381
|
let supported;
|
|
8354
8382
|
let perf;
|
|
@@ -8962,7 +8990,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8962
8990
|
hostInsert(fragmentStartAnchor, container, anchor);
|
|
8963
8991
|
hostInsert(fragmentEndAnchor, container, anchor);
|
|
8964
8992
|
mountChildren(
|
|
8965
|
-
|
|
8993
|
+
// #10007
|
|
8994
|
+
// such fragment like `<></>` will be compiled into
|
|
8995
|
+
// a fragment which doesn't have a children.
|
|
8996
|
+
// In this case fallback to an empty array
|
|
8997
|
+
n2.children || [],
|
|
8966
8998
|
container,
|
|
8967
8999
|
fragmentEndAnchor,
|
|
8968
9000
|
parentComponent,
|
|
@@ -9843,6 +9875,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9843
9875
|
}
|
|
9844
9876
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9845
9877
|
};
|
|
9878
|
+
let isFlushing = false;
|
|
9846
9879
|
const render = (vnode, container, namespace) => {
|
|
9847
9880
|
if (vnode == null) {
|
|
9848
9881
|
if (container._vnode) {
|
|
@@ -9859,8 +9892,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9859
9892
|
namespace
|
|
9860
9893
|
);
|
|
9861
9894
|
}
|
|
9862
|
-
|
|
9863
|
-
|
|
9895
|
+
if (!isFlushing) {
|
|
9896
|
+
isFlushing = true;
|
|
9897
|
+
flushPreFlushCbs();
|
|
9898
|
+
flushPostFlushCbs();
|
|
9899
|
+
isFlushing = false;
|
|
9900
|
+
}
|
|
9864
9901
|
container._vnode = vnode;
|
|
9865
9902
|
};
|
|
9866
9903
|
const internals = {
|
|
@@ -10793,8 +10830,13 @@ let setInSSRSetupState;
|
|
|
10793
10830
|
);
|
|
10794
10831
|
}
|
|
10795
10832
|
const setCurrentInstance = (instance) => {
|
|
10833
|
+
const prev = currentInstance;
|
|
10796
10834
|
internalSetCurrentInstance(instance);
|
|
10797
10835
|
instance.scope.on();
|
|
10836
|
+
return () => {
|
|
10837
|
+
instance.scope.off();
|
|
10838
|
+
internalSetCurrentInstance(prev);
|
|
10839
|
+
};
|
|
10798
10840
|
};
|
|
10799
10841
|
const unsetCurrentInstance = () => {
|
|
10800
10842
|
currentInstance && currentInstance.scope.off();
|
|
@@ -10856,7 +10898,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10856
10898
|
const { setup } = Component;
|
|
10857
10899
|
if (setup) {
|
|
10858
10900
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10859
|
-
setCurrentInstance(instance);
|
|
10901
|
+
const reset = setCurrentInstance(instance);
|
|
10860
10902
|
pauseTracking();
|
|
10861
10903
|
const setupResult = callWithErrorHandling(
|
|
10862
10904
|
setup,
|
|
@@ -10868,7 +10910,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10868
10910
|
]
|
|
10869
10911
|
);
|
|
10870
10912
|
resetTracking();
|
|
10871
|
-
|
|
10913
|
+
reset();
|
|
10872
10914
|
if (isPromise(setupResult)) {
|
|
10873
10915
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10874
10916
|
if (isSSR) {
|
|
@@ -10976,13 +11018,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10976
11018
|
}
|
|
10977
11019
|
}
|
|
10978
11020
|
if (__VUE_OPTIONS_API__ && !skipOptions) {
|
|
10979
|
-
setCurrentInstance(instance);
|
|
11021
|
+
const reset = setCurrentInstance(instance);
|
|
10980
11022
|
pauseTracking();
|
|
10981
11023
|
try {
|
|
10982
11024
|
applyOptions(instance);
|
|
10983
11025
|
} finally {
|
|
10984
11026
|
resetTracking();
|
|
10985
|
-
|
|
11027
|
+
reset();
|
|
10986
11028
|
}
|
|
10987
11029
|
}
|
|
10988
11030
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
@@ -11349,7 +11391,7 @@ function isMemoSame(cached, memo) {
|
|
|
11349
11391
|
return true;
|
|
11350
11392
|
}
|
|
11351
11393
|
|
|
11352
|
-
const version = "3.4.
|
|
11394
|
+
const version = "3.4.7";
|
|
11353
11395
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
11354
11396
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11355
11397
|
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
|
@@ -11798,6 +11840,9 @@ const vShow = {
|
|
|
11798
11840
|
setDisplay(el, value);
|
|
11799
11841
|
}
|
|
11800
11842
|
};
|
|
11843
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11844
|
+
vShow.name = "show";
|
|
11845
|
+
}
|
|
11801
11846
|
function setDisplay(el, value) {
|
|
11802
11847
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11803
11848
|
}
|
|
@@ -15168,7 +15213,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
15168
15213
|
}
|
|
15169
15214
|
}
|
|
15170
15215
|
}
|
|
15171
|
-
if (isCompatEnabled(
|
|
15216
|
+
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
|
15172
15217
|
"COMPILER_NATIVE_TEMPLATE",
|
|
15173
15218
|
currentOptions
|
|
15174
15219
|
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
|
@@ -15782,8 +15827,7 @@ function createTransformContext(root, {
|
|
|
15782
15827
|
}
|
|
15783
15828
|
context.parent.children.splice(removalIndex, 1);
|
|
15784
15829
|
},
|
|
15785
|
-
onNodeRemoved:
|
|
15786
|
-
},
|
|
15830
|
+
onNodeRemoved: NOOP,
|
|
15787
15831
|
addIdentifiers(exp) {
|
|
15788
15832
|
},
|
|
15789
15833
|
removeIdentifiers(exp) {
|
package/dist/vue.global.js
CHANGED
|
@@ -1892,7 +1892,9 @@ var Vue = (function () {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
function flushPostFlushCbs(seen) {
|
|
1894
1894
|
if (pendingPostFlushCbs.length) {
|
|
1895
|
-
const deduped = [...new Set(pendingPostFlushCbs)]
|
|
1895
|
+
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
|
1896
|
+
(a, b) => getId(a) - getId(b)
|
|
1897
|
+
);
|
|
1896
1898
|
pendingPostFlushCbs.length = 0;
|
|
1897
1899
|
if (activePostFlushCbs) {
|
|
1898
1900
|
activePostFlushCbs.push(...deduped);
|
|
@@ -1902,7 +1904,6 @@ var Vue = (function () {
|
|
|
1902
1904
|
{
|
|
1903
1905
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1904
1906
|
}
|
|
1905
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
1906
1907
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1907
1908
|
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
|
1908
1909
|
continue;
|
|
@@ -3516,6 +3517,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3516
3517
|
{
|
|
3517
3518
|
assertNumber(timeout, `Suspense timeout`);
|
|
3518
3519
|
}
|
|
3520
|
+
const initialAnchor = anchor;
|
|
3519
3521
|
const suspense = {
|
|
3520
3522
|
vnode,
|
|
3521
3523
|
parent: parentSuspense,
|
|
@@ -3523,7 +3525,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3523
3525
|
namespace,
|
|
3524
3526
|
container,
|
|
3525
3527
|
hiddenContainer,
|
|
3526
|
-
anchor,
|
|
3527
3528
|
deps: 0,
|
|
3528
3529
|
pendingId: suspenseId++,
|
|
3529
3530
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
@@ -3566,20 +3567,21 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3566
3567
|
move(
|
|
3567
3568
|
pendingBranch,
|
|
3568
3569
|
container2,
|
|
3569
|
-
next(activeBranch),
|
|
3570
|
+
anchor === initialAnchor ? next(activeBranch) : anchor,
|
|
3570
3571
|
0
|
|
3571
3572
|
);
|
|
3572
3573
|
queuePostFlushCb(effects);
|
|
3573
3574
|
}
|
|
3574
3575
|
};
|
|
3575
3576
|
}
|
|
3576
|
-
let { anchor: anchor2 } = suspense;
|
|
3577
3577
|
if (activeBranch) {
|
|
3578
|
-
|
|
3578
|
+
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
|
3579
|
+
anchor = next(activeBranch);
|
|
3580
|
+
}
|
|
3579
3581
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
3580
3582
|
}
|
|
3581
3583
|
if (!delayEnter) {
|
|
3582
|
-
move(pendingBranch, container2,
|
|
3584
|
+
move(pendingBranch, container2, anchor, 0);
|
|
3583
3585
|
}
|
|
3584
3586
|
}
|
|
3585
3587
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -4074,14 +4076,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4074
4076
|
cb = value.handler;
|
|
4075
4077
|
options = value;
|
|
4076
4078
|
}
|
|
4077
|
-
const
|
|
4078
|
-
setCurrentInstance(this);
|
|
4079
|
+
const reset = setCurrentInstance(this);
|
|
4079
4080
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4080
|
-
|
|
4081
|
-
setCurrentInstance(cur);
|
|
4082
|
-
} else {
|
|
4083
|
-
unsetCurrentInstance();
|
|
4084
|
-
}
|
|
4081
|
+
reset();
|
|
4085
4082
|
return res;
|
|
4086
4083
|
}
|
|
4087
4084
|
function createPathGetter(ctx, path) {
|
|
@@ -4133,12 +4130,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4133
4130
|
}
|
|
4134
4131
|
}
|
|
4135
4132
|
function withDirectives(vnode, directives) {
|
|
4136
|
-
|
|
4137
|
-
if (internalInstance === null) {
|
|
4133
|
+
if (currentRenderingInstance === null) {
|
|
4138
4134
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
4139
4135
|
return vnode;
|
|
4140
4136
|
}
|
|
4141
|
-
const instance = getExposeProxy(
|
|
4137
|
+
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
|
4142
4138
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
4143
4139
|
for (let i = 0; i < directives.length; i++) {
|
|
4144
4140
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -4927,9 +4923,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4927
4923
|
return;
|
|
4928
4924
|
}
|
|
4929
4925
|
pauseTracking();
|
|
4930
|
-
setCurrentInstance(target);
|
|
4926
|
+
const reset = setCurrentInstance(target);
|
|
4931
4927
|
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
4932
|
-
|
|
4928
|
+
reset();
|
|
4933
4929
|
resetTracking();
|
|
4934
4930
|
return res;
|
|
4935
4931
|
});
|
|
@@ -6521,7 +6517,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6521
6517
|
return vm;
|
|
6522
6518
|
}
|
|
6523
6519
|
}
|
|
6524
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6520
|
+
Vue.version = `2.6.14-compat:${"3.4.7"}`;
|
|
6525
6521
|
Vue.config = singletonApp.config;
|
|
6526
6522
|
Vue.use = (p, ...options) => {
|
|
6527
6523
|
if (p && isFunction(p.install)) {
|
|
@@ -7361,12 +7357,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7361
7357
|
if (key in propsDefaults) {
|
|
7362
7358
|
value = propsDefaults[key];
|
|
7363
7359
|
} else {
|
|
7364
|
-
setCurrentInstance(instance);
|
|
7360
|
+
const reset = setCurrentInstance(instance);
|
|
7365
7361
|
value = propsDefaults[key] = defaultValue.call(
|
|
7366
7362
|
isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null,
|
|
7367
7363
|
props
|
|
7368
7364
|
);
|
|
7369
|
-
|
|
7365
|
+
reset();
|
|
7370
7366
|
}
|
|
7371
7367
|
} else {
|
|
7372
7368
|
value = defaultValue;
|
|
@@ -8066,7 +8062,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
8066
8062
|
if (props) {
|
|
8067
8063
|
{
|
|
8068
8064
|
for (const key in props) {
|
|
8069
|
-
if (propHasMismatch(el, key, props[key])) {
|
|
8065
|
+
if (propHasMismatch(el, key, props[key], vnode)) {
|
|
8070
8066
|
hasMismatch = true;
|
|
8071
8067
|
}
|
|
8072
8068
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -8241,7 +8237,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8241
8237
|
};
|
|
8242
8238
|
return [hydrate, hydrateNode];
|
|
8243
8239
|
}
|
|
8244
|
-
function propHasMismatch(el, key, clientValue) {
|
|
8240
|
+
function propHasMismatch(el, key, clientValue, vnode) {
|
|
8245
8241
|
let mismatchType;
|
|
8246
8242
|
let mismatchKey;
|
|
8247
8243
|
let actual;
|
|
@@ -8253,14 +8249,23 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8253
8249
|
mismatchType = mismatchKey = `class`;
|
|
8254
8250
|
}
|
|
8255
8251
|
} else if (key === "style") {
|
|
8256
|
-
actual = el.getAttribute("style");
|
|
8257
|
-
expected =
|
|
8258
|
-
|
|
8252
|
+
actual = toStyleMap(el.getAttribute("style") || "");
|
|
8253
|
+
expected = toStyleMap(
|
|
8254
|
+
isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
|
|
8255
|
+
);
|
|
8256
|
+
if (vnode.dirs) {
|
|
8257
|
+
for (const { dir, value } of vnode.dirs) {
|
|
8258
|
+
if (dir.name === "show" && !value) {
|
|
8259
|
+
expected.set("display", "none");
|
|
8260
|
+
}
|
|
8261
|
+
}
|
|
8262
|
+
}
|
|
8263
|
+
if (!isMapEqual(actual, expected)) {
|
|
8259
8264
|
mismatchType = mismatchKey = "style";
|
|
8260
8265
|
}
|
|
8261
8266
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8262
|
-
actual = el.hasAttribute(key)
|
|
8263
|
-
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ?
|
|
8267
|
+
actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
|
|
8268
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
|
|
8264
8269
|
if (actual !== expected) {
|
|
8265
8270
|
mismatchType = `attribute`;
|
|
8266
8271
|
mismatchKey = key;
|
|
@@ -8295,6 +8300,29 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8295
8300
|
}
|
|
8296
8301
|
return true;
|
|
8297
8302
|
}
|
|
8303
|
+
function toStyleMap(str) {
|
|
8304
|
+
const styleMap = /* @__PURE__ */ new Map();
|
|
8305
|
+
for (const item of str.split(";")) {
|
|
8306
|
+
let [key, value] = item.split(":");
|
|
8307
|
+
key = key == null ? void 0 : key.trim();
|
|
8308
|
+
value = value == null ? void 0 : value.trim();
|
|
8309
|
+
if (key && value) {
|
|
8310
|
+
styleMap.set(key, value);
|
|
8311
|
+
}
|
|
8312
|
+
}
|
|
8313
|
+
return styleMap;
|
|
8314
|
+
}
|
|
8315
|
+
function isMapEqual(a, b) {
|
|
8316
|
+
if (a.size !== b.size) {
|
|
8317
|
+
return false;
|
|
8318
|
+
}
|
|
8319
|
+
for (const [key, value] of a) {
|
|
8320
|
+
if (value !== b.get(key)) {
|
|
8321
|
+
return false;
|
|
8322
|
+
}
|
|
8323
|
+
}
|
|
8324
|
+
return true;
|
|
8325
|
+
}
|
|
8298
8326
|
|
|
8299
8327
|
let supported;
|
|
8300
8328
|
let perf;
|
|
@@ -8883,7 +8911,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8883
8911
|
hostInsert(fragmentStartAnchor, container, anchor);
|
|
8884
8912
|
hostInsert(fragmentEndAnchor, container, anchor);
|
|
8885
8913
|
mountChildren(
|
|
8886
|
-
|
|
8914
|
+
// #10007
|
|
8915
|
+
// such fragment like `<></>` will be compiled into
|
|
8916
|
+
// a fragment which doesn't have a children.
|
|
8917
|
+
// In this case fallback to an empty array
|
|
8918
|
+
n2.children || [],
|
|
8887
8919
|
container,
|
|
8888
8920
|
fragmentEndAnchor,
|
|
8889
8921
|
parentComponent,
|
|
@@ -9751,6 +9783,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9751
9783
|
}
|
|
9752
9784
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9753
9785
|
};
|
|
9786
|
+
let isFlushing = false;
|
|
9754
9787
|
const render = (vnode, container, namespace) => {
|
|
9755
9788
|
if (vnode == null) {
|
|
9756
9789
|
if (container._vnode) {
|
|
@@ -9767,8 +9800,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9767
9800
|
namespace
|
|
9768
9801
|
);
|
|
9769
9802
|
}
|
|
9770
|
-
|
|
9771
|
-
|
|
9803
|
+
if (!isFlushing) {
|
|
9804
|
+
isFlushing = true;
|
|
9805
|
+
flushPreFlushCbs();
|
|
9806
|
+
flushPostFlushCbs();
|
|
9807
|
+
isFlushing = false;
|
|
9808
|
+
}
|
|
9772
9809
|
container._vnode = vnode;
|
|
9773
9810
|
};
|
|
9774
9811
|
const internals = {
|
|
@@ -10684,8 +10721,13 @@ Component that was made reactive: `,
|
|
|
10684
10721
|
};
|
|
10685
10722
|
}
|
|
10686
10723
|
const setCurrentInstance = (instance) => {
|
|
10724
|
+
const prev = currentInstance;
|
|
10687
10725
|
internalSetCurrentInstance(instance);
|
|
10688
10726
|
instance.scope.on();
|
|
10727
|
+
return () => {
|
|
10728
|
+
instance.scope.off();
|
|
10729
|
+
internalSetCurrentInstance(prev);
|
|
10730
|
+
};
|
|
10689
10731
|
};
|
|
10690
10732
|
const unsetCurrentInstance = () => {
|
|
10691
10733
|
currentInstance && currentInstance.scope.off();
|
|
@@ -10747,7 +10789,7 @@ Component that was made reactive: `,
|
|
|
10747
10789
|
const { setup } = Component;
|
|
10748
10790
|
if (setup) {
|
|
10749
10791
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10750
|
-
setCurrentInstance(instance);
|
|
10792
|
+
const reset = setCurrentInstance(instance);
|
|
10751
10793
|
pauseTracking();
|
|
10752
10794
|
const setupResult = callWithErrorHandling(
|
|
10753
10795
|
setup,
|
|
@@ -10759,7 +10801,7 @@ Component that was made reactive: `,
|
|
|
10759
10801
|
]
|
|
10760
10802
|
);
|
|
10761
10803
|
resetTracking();
|
|
10762
|
-
|
|
10804
|
+
reset();
|
|
10763
10805
|
if (isPromise(setupResult)) {
|
|
10764
10806
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10765
10807
|
if (isSSR) {
|
|
@@ -10865,13 +10907,13 @@ Component that was made reactive: `,
|
|
|
10865
10907
|
}
|
|
10866
10908
|
}
|
|
10867
10909
|
if (!skipOptions) {
|
|
10868
|
-
setCurrentInstance(instance);
|
|
10910
|
+
const reset = setCurrentInstance(instance);
|
|
10869
10911
|
pauseTracking();
|
|
10870
10912
|
try {
|
|
10871
10913
|
applyOptions(instance);
|
|
10872
10914
|
} finally {
|
|
10873
10915
|
resetTracking();
|
|
10874
|
-
|
|
10916
|
+
reset();
|
|
10875
10917
|
}
|
|
10876
10918
|
}
|
|
10877
10919
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
@@ -11224,7 +11266,7 @@ Component that was made reactive: `,
|
|
|
11224
11266
|
return true;
|
|
11225
11267
|
}
|
|
11226
11268
|
|
|
11227
|
-
const version = "3.4.
|
|
11269
|
+
const version = "3.4.7";
|
|
11228
11270
|
const warn = warn$1 ;
|
|
11229
11271
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11230
11272
|
const devtools = devtools$1 ;
|
|
@@ -11665,6 +11707,9 @@ Component that was made reactive: `,
|
|
|
11665
11707
|
setDisplay(el, value);
|
|
11666
11708
|
}
|
|
11667
11709
|
};
|
|
11710
|
+
{
|
|
11711
|
+
vShow.name = "show";
|
|
11712
|
+
}
|
|
11668
11713
|
function setDisplay(el, value) {
|
|
11669
11714
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11670
11715
|
}
|
|
@@ -14981,7 +15026,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14981
15026
|
}
|
|
14982
15027
|
}
|
|
14983
15028
|
}
|
|
14984
|
-
if (isCompatEnabled(
|
|
15029
|
+
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
|
14985
15030
|
"COMPILER_NATIVE_TEMPLATE",
|
|
14986
15031
|
currentOptions
|
|
14987
15032
|
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
|
@@ -15594,8 +15639,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15594
15639
|
}
|
|
15595
15640
|
context.parent.children.splice(removalIndex, 1);
|
|
15596
15641
|
},
|
|
15597
|
-
onNodeRemoved:
|
|
15598
|
-
},
|
|
15642
|
+
onNodeRemoved: NOOP,
|
|
15599
15643
|
addIdentifiers(exp) {
|
|
15600
15644
|
},
|
|
15601
15645
|
removeIdentifiers(exp) {
|