@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
|
@@ -1828,7 +1828,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
function flushPostFlushCbs(seen) {
|
|
1830
1830
|
if (pendingPostFlushCbs.length) {
|
|
1831
|
-
const deduped = [...new Set(pendingPostFlushCbs)]
|
|
1831
|
+
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
|
1832
|
+
(a, b) => getId(a) - getId(b)
|
|
1833
|
+
);
|
|
1832
1834
|
pendingPostFlushCbs.length = 0;
|
|
1833
1835
|
if (activePostFlushCbs) {
|
|
1834
1836
|
activePostFlushCbs.push(...deduped);
|
|
@@ -1838,7 +1840,6 @@ function flushPostFlushCbs(seen) {
|
|
|
1838
1840
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1839
1841
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1840
1842
|
}
|
|
1841
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
1842
1843
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1843
1844
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
|
1844
1845
|
continue;
|
|
@@ -3455,6 +3456,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3455
3456
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3456
3457
|
assertNumber(timeout, `Suspense timeout`);
|
|
3457
3458
|
}
|
|
3459
|
+
const initialAnchor = anchor;
|
|
3458
3460
|
const suspense = {
|
|
3459
3461
|
vnode,
|
|
3460
3462
|
parent: parentSuspense,
|
|
@@ -3462,7 +3464,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3462
3464
|
namespace,
|
|
3463
3465
|
container,
|
|
3464
3466
|
hiddenContainer,
|
|
3465
|
-
anchor,
|
|
3466
3467
|
deps: 0,
|
|
3467
3468
|
pendingId: suspenseId++,
|
|
3468
3469
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
@@ -3505,20 +3506,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3505
3506
|
move(
|
|
3506
3507
|
pendingBranch,
|
|
3507
3508
|
container2,
|
|
3508
|
-
next(activeBranch),
|
|
3509
|
+
anchor === initialAnchor ? next(activeBranch) : anchor,
|
|
3509
3510
|
0
|
|
3510
3511
|
);
|
|
3511
3512
|
queuePostFlushCb(effects);
|
|
3512
3513
|
}
|
|
3513
3514
|
};
|
|
3514
3515
|
}
|
|
3515
|
-
let { anchor: anchor2 } = suspense;
|
|
3516
3516
|
if (activeBranch) {
|
|
3517
|
-
|
|
3517
|
+
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
|
3518
|
+
anchor = next(activeBranch);
|
|
3519
|
+
}
|
|
3518
3520
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
3519
3521
|
}
|
|
3520
3522
|
if (!delayEnter) {
|
|
3521
|
-
move(pendingBranch, container2,
|
|
3523
|
+
move(pendingBranch, container2, anchor, 0);
|
|
3522
3524
|
}
|
|
3523
3525
|
}
|
|
3524
3526
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -4040,14 +4042,9 @@ function instanceWatch(source, value, options) {
|
|
|
4040
4042
|
cb = value.handler;
|
|
4041
4043
|
options = value;
|
|
4042
4044
|
}
|
|
4043
|
-
const
|
|
4044
|
-
setCurrentInstance(this);
|
|
4045
|
+
const reset = setCurrentInstance(this);
|
|
4045
4046
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4046
|
-
|
|
4047
|
-
setCurrentInstance(cur);
|
|
4048
|
-
} else {
|
|
4049
|
-
unsetCurrentInstance();
|
|
4050
|
-
}
|
|
4047
|
+
reset();
|
|
4051
4048
|
return res;
|
|
4052
4049
|
}
|
|
4053
4050
|
function createPathGetter(ctx, path) {
|
|
@@ -4099,12 +4096,11 @@ function validateDirectiveName(name) {
|
|
|
4099
4096
|
}
|
|
4100
4097
|
}
|
|
4101
4098
|
function withDirectives(vnode, directives) {
|
|
4102
|
-
|
|
4103
|
-
if (internalInstance === null) {
|
|
4099
|
+
if (currentRenderingInstance === null) {
|
|
4104
4100
|
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
|
4105
4101
|
return vnode;
|
|
4106
4102
|
}
|
|
4107
|
-
const instance = getExposeProxy(
|
|
4103
|
+
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
|
4108
4104
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
4109
4105
|
for (let i = 0; i < directives.length; i++) {
|
|
4110
4106
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -4901,9 +4897,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4901
4897
|
return;
|
|
4902
4898
|
}
|
|
4903
4899
|
pauseTracking();
|
|
4904
|
-
setCurrentInstance(target);
|
|
4900
|
+
const reset = setCurrentInstance(target);
|
|
4905
4901
|
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
4906
|
-
|
|
4902
|
+
reset();
|
|
4907
4903
|
resetTracking();
|
|
4908
4904
|
return res;
|
|
4909
4905
|
});
|
|
@@ -6497,7 +6493,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6497
6493
|
return vm;
|
|
6498
6494
|
}
|
|
6499
6495
|
}
|
|
6500
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6496
|
+
Vue.version = `2.6.14-compat:${"3.4.7"}`;
|
|
6501
6497
|
Vue.config = singletonApp.config;
|
|
6502
6498
|
Vue.use = (p, ...options) => {
|
|
6503
6499
|
if (p && isFunction(p.install)) {
|
|
@@ -7340,12 +7336,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
7340
7336
|
if (key in propsDefaults) {
|
|
7341
7337
|
value = propsDefaults[key];
|
|
7342
7338
|
} else {
|
|
7343
|
-
setCurrentInstance(instance);
|
|
7339
|
+
const reset = setCurrentInstance(instance);
|
|
7344
7340
|
value = propsDefaults[key] = defaultValue.call(
|
|
7345
7341
|
isCompatEnabled("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null,
|
|
7346
7342
|
props
|
|
7347
7343
|
);
|
|
7348
|
-
|
|
7344
|
+
reset();
|
|
7349
7345
|
}
|
|
7350
7346
|
} else {
|
|
7351
7347
|
value = defaultValue;
|
|
@@ -8045,7 +8041,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
8045
8041
|
if (props) {
|
|
8046
8042
|
if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
8047
8043
|
for (const key in props) {
|
|
8048
|
-
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key])) {
|
|
8044
|
+
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode)) {
|
|
8049
8045
|
hasMismatch = true;
|
|
8050
8046
|
}
|
|
8051
8047
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -8230,7 +8226,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8230
8226
|
};
|
|
8231
8227
|
return [hydrate, hydrateNode];
|
|
8232
8228
|
}
|
|
8233
|
-
function propHasMismatch(el, key, clientValue) {
|
|
8229
|
+
function propHasMismatch(el, key, clientValue, vnode) {
|
|
8234
8230
|
let mismatchType;
|
|
8235
8231
|
let mismatchKey;
|
|
8236
8232
|
let actual;
|
|
@@ -8242,14 +8238,23 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
8242
8238
|
mismatchType = mismatchKey = `class`;
|
|
8243
8239
|
}
|
|
8244
8240
|
} else if (key === "style") {
|
|
8245
|
-
actual = el.getAttribute("style");
|
|
8246
|
-
expected =
|
|
8247
|
-
|
|
8241
|
+
actual = toStyleMap(el.getAttribute("style") || "");
|
|
8242
|
+
expected = toStyleMap(
|
|
8243
|
+
isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
|
|
8244
|
+
);
|
|
8245
|
+
if (vnode.dirs) {
|
|
8246
|
+
for (const { dir, value } of vnode.dirs) {
|
|
8247
|
+
if (dir.name === "show" && !value) {
|
|
8248
|
+
expected.set("display", "none");
|
|
8249
|
+
}
|
|
8250
|
+
}
|
|
8251
|
+
}
|
|
8252
|
+
if (!isMapEqual(actual, expected)) {
|
|
8248
8253
|
mismatchType = mismatchKey = "style";
|
|
8249
8254
|
}
|
|
8250
8255
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8251
|
-
actual = el.hasAttribute(key)
|
|
8252
|
-
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ?
|
|
8256
|
+
actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
|
|
8257
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
|
|
8253
8258
|
if (actual !== expected) {
|
|
8254
8259
|
mismatchType = `attribute`;
|
|
8255
8260
|
mismatchKey = key;
|
|
@@ -8284,6 +8289,29 @@ function isSetEqual(a, b) {
|
|
|
8284
8289
|
}
|
|
8285
8290
|
return true;
|
|
8286
8291
|
}
|
|
8292
|
+
function toStyleMap(str) {
|
|
8293
|
+
const styleMap = /* @__PURE__ */ new Map();
|
|
8294
|
+
for (const item of str.split(";")) {
|
|
8295
|
+
let [key, value] = item.split(":");
|
|
8296
|
+
key = key == null ? void 0 : key.trim();
|
|
8297
|
+
value = value == null ? void 0 : value.trim();
|
|
8298
|
+
if (key && value) {
|
|
8299
|
+
styleMap.set(key, value);
|
|
8300
|
+
}
|
|
8301
|
+
}
|
|
8302
|
+
return styleMap;
|
|
8303
|
+
}
|
|
8304
|
+
function isMapEqual(a, b) {
|
|
8305
|
+
if (a.size !== b.size) {
|
|
8306
|
+
return false;
|
|
8307
|
+
}
|
|
8308
|
+
for (const [key, value] of a) {
|
|
8309
|
+
if (value !== b.get(key)) {
|
|
8310
|
+
return false;
|
|
8311
|
+
}
|
|
8312
|
+
}
|
|
8313
|
+
return true;
|
|
8314
|
+
}
|
|
8287
8315
|
|
|
8288
8316
|
let supported;
|
|
8289
8317
|
let perf;
|
|
@@ -8897,7 +8925,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8897
8925
|
hostInsert(fragmentStartAnchor, container, anchor);
|
|
8898
8926
|
hostInsert(fragmentEndAnchor, container, anchor);
|
|
8899
8927
|
mountChildren(
|
|
8900
|
-
|
|
8928
|
+
// #10007
|
|
8929
|
+
// such fragment like `<></>` will be compiled into
|
|
8930
|
+
// a fragment which doesn't have a children.
|
|
8931
|
+
// In this case fallback to an empty array
|
|
8932
|
+
n2.children || [],
|
|
8901
8933
|
container,
|
|
8902
8934
|
fragmentEndAnchor,
|
|
8903
8935
|
parentComponent,
|
|
@@ -9778,6 +9810,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9778
9810
|
}
|
|
9779
9811
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9780
9812
|
};
|
|
9813
|
+
let isFlushing = false;
|
|
9781
9814
|
const render = (vnode, container, namespace) => {
|
|
9782
9815
|
if (vnode == null) {
|
|
9783
9816
|
if (container._vnode) {
|
|
@@ -9794,8 +9827,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9794
9827
|
namespace
|
|
9795
9828
|
);
|
|
9796
9829
|
}
|
|
9797
|
-
|
|
9798
|
-
|
|
9830
|
+
if (!isFlushing) {
|
|
9831
|
+
isFlushing = true;
|
|
9832
|
+
flushPreFlushCbs();
|
|
9833
|
+
flushPostFlushCbs();
|
|
9834
|
+
isFlushing = false;
|
|
9835
|
+
}
|
|
9799
9836
|
container._vnode = vnode;
|
|
9800
9837
|
};
|
|
9801
9838
|
const internals = {
|
|
@@ -10728,8 +10765,13 @@ let setInSSRSetupState;
|
|
|
10728
10765
|
);
|
|
10729
10766
|
}
|
|
10730
10767
|
const setCurrentInstance = (instance) => {
|
|
10768
|
+
const prev = currentInstance;
|
|
10731
10769
|
internalSetCurrentInstance(instance);
|
|
10732
10770
|
instance.scope.on();
|
|
10771
|
+
return () => {
|
|
10772
|
+
instance.scope.off();
|
|
10773
|
+
internalSetCurrentInstance(prev);
|
|
10774
|
+
};
|
|
10733
10775
|
};
|
|
10734
10776
|
const unsetCurrentInstance = () => {
|
|
10735
10777
|
currentInstance && currentInstance.scope.off();
|
|
@@ -10791,7 +10833,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10791
10833
|
const { setup } = Component;
|
|
10792
10834
|
if (setup) {
|
|
10793
10835
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10794
|
-
setCurrentInstance(instance);
|
|
10836
|
+
const reset = setCurrentInstance(instance);
|
|
10795
10837
|
pauseTracking();
|
|
10796
10838
|
const setupResult = callWithErrorHandling(
|
|
10797
10839
|
setup,
|
|
@@ -10803,7 +10845,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10803
10845
|
]
|
|
10804
10846
|
);
|
|
10805
10847
|
resetTracking();
|
|
10806
|
-
|
|
10848
|
+
reset();
|
|
10807
10849
|
if (isPromise(setupResult)) {
|
|
10808
10850
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10809
10851
|
if (isSSR) {
|
|
@@ -10911,13 +10953,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10911
10953
|
}
|
|
10912
10954
|
}
|
|
10913
10955
|
if (__VUE_OPTIONS_API__ && !skipOptions) {
|
|
10914
|
-
setCurrentInstance(instance);
|
|
10956
|
+
const reset = setCurrentInstance(instance);
|
|
10915
10957
|
pauseTracking();
|
|
10916
10958
|
try {
|
|
10917
10959
|
applyOptions(instance);
|
|
10918
10960
|
} finally {
|
|
10919
10961
|
resetTracking();
|
|
10920
|
-
|
|
10962
|
+
reset();
|
|
10921
10963
|
}
|
|
10922
10964
|
}
|
|
10923
10965
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
@@ -11284,7 +11326,7 @@ function isMemoSame(cached, memo) {
|
|
|
11284
11326
|
return true;
|
|
11285
11327
|
}
|
|
11286
11328
|
|
|
11287
|
-
const version = "3.4.
|
|
11329
|
+
const version = "3.4.7";
|
|
11288
11330
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
11289
11331
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11290
11332
|
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
|
@@ -11733,6 +11775,9 @@ const vShow = {
|
|
|
11733
11775
|
setDisplay(el, value);
|
|
11734
11776
|
}
|
|
11735
11777
|
};
|
|
11778
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11779
|
+
vShow.name = "show";
|
|
11780
|
+
}
|
|
11736
11781
|
function setDisplay(el, value) {
|
|
11737
11782
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11738
11783
|
}
|
|
@@ -1827,7 +1827,9 @@ var Vue = (function () {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
function flushPostFlushCbs(seen) {
|
|
1829
1829
|
if (pendingPostFlushCbs.length) {
|
|
1830
|
-
const deduped = [...new Set(pendingPostFlushCbs)]
|
|
1830
|
+
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
|
1831
|
+
(a, b) => getId(a) - getId(b)
|
|
1832
|
+
);
|
|
1831
1833
|
pendingPostFlushCbs.length = 0;
|
|
1832
1834
|
if (activePostFlushCbs) {
|
|
1833
1835
|
activePostFlushCbs.push(...deduped);
|
|
@@ -1837,7 +1839,6 @@ var Vue = (function () {
|
|
|
1837
1839
|
{
|
|
1838
1840
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1839
1841
|
}
|
|
1840
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
1841
1842
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1842
1843
|
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
|
1843
1844
|
continue;
|
|
@@ -3451,6 +3452,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3451
3452
|
{
|
|
3452
3453
|
assertNumber(timeout, `Suspense timeout`);
|
|
3453
3454
|
}
|
|
3455
|
+
const initialAnchor = anchor;
|
|
3454
3456
|
const suspense = {
|
|
3455
3457
|
vnode,
|
|
3456
3458
|
parent: parentSuspense,
|
|
@@ -3458,7 +3460,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3458
3460
|
namespace,
|
|
3459
3461
|
container,
|
|
3460
3462
|
hiddenContainer,
|
|
3461
|
-
anchor,
|
|
3462
3463
|
deps: 0,
|
|
3463
3464
|
pendingId: suspenseId++,
|
|
3464
3465
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
@@ -3501,20 +3502,21 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3501
3502
|
move(
|
|
3502
3503
|
pendingBranch,
|
|
3503
3504
|
container2,
|
|
3504
|
-
next(activeBranch),
|
|
3505
|
+
anchor === initialAnchor ? next(activeBranch) : anchor,
|
|
3505
3506
|
0
|
|
3506
3507
|
);
|
|
3507
3508
|
queuePostFlushCb(effects);
|
|
3508
3509
|
}
|
|
3509
3510
|
};
|
|
3510
3511
|
}
|
|
3511
|
-
let { anchor: anchor2 } = suspense;
|
|
3512
3512
|
if (activeBranch) {
|
|
3513
|
-
|
|
3513
|
+
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
|
3514
|
+
anchor = next(activeBranch);
|
|
3515
|
+
}
|
|
3514
3516
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
3515
3517
|
}
|
|
3516
3518
|
if (!delayEnter) {
|
|
3517
|
-
move(pendingBranch, container2,
|
|
3519
|
+
move(pendingBranch, container2, anchor, 0);
|
|
3518
3520
|
}
|
|
3519
3521
|
}
|
|
3520
3522
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -4009,14 +4011,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4009
4011
|
cb = value.handler;
|
|
4010
4012
|
options = value;
|
|
4011
4013
|
}
|
|
4012
|
-
const
|
|
4013
|
-
setCurrentInstance(this);
|
|
4014
|
+
const reset = setCurrentInstance(this);
|
|
4014
4015
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4015
|
-
|
|
4016
|
-
setCurrentInstance(cur);
|
|
4017
|
-
} else {
|
|
4018
|
-
unsetCurrentInstance();
|
|
4019
|
-
}
|
|
4016
|
+
reset();
|
|
4020
4017
|
return res;
|
|
4021
4018
|
}
|
|
4022
4019
|
function createPathGetter(ctx, path) {
|
|
@@ -4068,12 +4065,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4068
4065
|
}
|
|
4069
4066
|
}
|
|
4070
4067
|
function withDirectives(vnode, directives) {
|
|
4071
|
-
|
|
4072
|
-
if (internalInstance === null) {
|
|
4068
|
+
if (currentRenderingInstance === null) {
|
|
4073
4069
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
4074
4070
|
return vnode;
|
|
4075
4071
|
}
|
|
4076
|
-
const instance = getExposeProxy(
|
|
4072
|
+
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
|
4077
4073
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
4078
4074
|
for (let i = 0; i < directives.length; i++) {
|
|
4079
4075
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -4862,9 +4858,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4862
4858
|
return;
|
|
4863
4859
|
}
|
|
4864
4860
|
pauseTracking();
|
|
4865
|
-
setCurrentInstance(target);
|
|
4861
|
+
const reset = setCurrentInstance(target);
|
|
4866
4862
|
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
4867
|
-
|
|
4863
|
+
reset();
|
|
4868
4864
|
resetTracking();
|
|
4869
4865
|
return res;
|
|
4870
4866
|
});
|
|
@@ -6456,7 +6452,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6456
6452
|
return vm;
|
|
6457
6453
|
}
|
|
6458
6454
|
}
|
|
6459
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6455
|
+
Vue.version = `2.6.14-compat:${"3.4.7"}`;
|
|
6460
6456
|
Vue.config = singletonApp.config;
|
|
6461
6457
|
Vue.use = (p, ...options) => {
|
|
6462
6458
|
if (p && isFunction(p.install)) {
|
|
@@ -7296,12 +7292,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7296
7292
|
if (key in propsDefaults) {
|
|
7297
7293
|
value = propsDefaults[key];
|
|
7298
7294
|
} else {
|
|
7299
|
-
setCurrentInstance(instance);
|
|
7295
|
+
const reset = setCurrentInstance(instance);
|
|
7300
7296
|
value = propsDefaults[key] = defaultValue.call(
|
|
7301
7297
|
isCompatEnabled("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null,
|
|
7302
7298
|
props
|
|
7303
7299
|
);
|
|
7304
|
-
|
|
7300
|
+
reset();
|
|
7305
7301
|
}
|
|
7306
7302
|
} else {
|
|
7307
7303
|
value = defaultValue;
|
|
@@ -8001,7 +7997,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
8001
7997
|
if (props) {
|
|
8002
7998
|
{
|
|
8003
7999
|
for (const key in props) {
|
|
8004
|
-
if (propHasMismatch(el, key, props[key])) {
|
|
8000
|
+
if (propHasMismatch(el, key, props[key], vnode)) {
|
|
8005
8001
|
hasMismatch = true;
|
|
8006
8002
|
}
|
|
8007
8003
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -8176,7 +8172,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8176
8172
|
};
|
|
8177
8173
|
return [hydrate, hydrateNode];
|
|
8178
8174
|
}
|
|
8179
|
-
function propHasMismatch(el, key, clientValue) {
|
|
8175
|
+
function propHasMismatch(el, key, clientValue, vnode) {
|
|
8180
8176
|
let mismatchType;
|
|
8181
8177
|
let mismatchKey;
|
|
8182
8178
|
let actual;
|
|
@@ -8188,14 +8184,23 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8188
8184
|
mismatchType = mismatchKey = `class`;
|
|
8189
8185
|
}
|
|
8190
8186
|
} else if (key === "style") {
|
|
8191
|
-
actual = el.getAttribute("style");
|
|
8192
|
-
expected =
|
|
8193
|
-
|
|
8187
|
+
actual = toStyleMap(el.getAttribute("style") || "");
|
|
8188
|
+
expected = toStyleMap(
|
|
8189
|
+
isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
|
|
8190
|
+
);
|
|
8191
|
+
if (vnode.dirs) {
|
|
8192
|
+
for (const { dir, value } of vnode.dirs) {
|
|
8193
|
+
if (dir.name === "show" && !value) {
|
|
8194
|
+
expected.set("display", "none");
|
|
8195
|
+
}
|
|
8196
|
+
}
|
|
8197
|
+
}
|
|
8198
|
+
if (!isMapEqual(actual, expected)) {
|
|
8194
8199
|
mismatchType = mismatchKey = "style";
|
|
8195
8200
|
}
|
|
8196
8201
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8197
|
-
actual = el.hasAttribute(key)
|
|
8198
|
-
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ?
|
|
8202
|
+
actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
|
|
8203
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
|
|
8199
8204
|
if (actual !== expected) {
|
|
8200
8205
|
mismatchType = `attribute`;
|
|
8201
8206
|
mismatchKey = key;
|
|
@@ -8230,6 +8235,29 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8230
8235
|
}
|
|
8231
8236
|
return true;
|
|
8232
8237
|
}
|
|
8238
|
+
function toStyleMap(str) {
|
|
8239
|
+
const styleMap = /* @__PURE__ */ new Map();
|
|
8240
|
+
for (const item of str.split(";")) {
|
|
8241
|
+
let [key, value] = item.split(":");
|
|
8242
|
+
key = key == null ? void 0 : key.trim();
|
|
8243
|
+
value = value == null ? void 0 : value.trim();
|
|
8244
|
+
if (key && value) {
|
|
8245
|
+
styleMap.set(key, value);
|
|
8246
|
+
}
|
|
8247
|
+
}
|
|
8248
|
+
return styleMap;
|
|
8249
|
+
}
|
|
8250
|
+
function isMapEqual(a, b) {
|
|
8251
|
+
if (a.size !== b.size) {
|
|
8252
|
+
return false;
|
|
8253
|
+
}
|
|
8254
|
+
for (const [key, value] of a) {
|
|
8255
|
+
if (value !== b.get(key)) {
|
|
8256
|
+
return false;
|
|
8257
|
+
}
|
|
8258
|
+
}
|
|
8259
|
+
return true;
|
|
8260
|
+
}
|
|
8233
8261
|
|
|
8234
8262
|
let supported;
|
|
8235
8263
|
let perf;
|
|
@@ -8818,7 +8846,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8818
8846
|
hostInsert(fragmentStartAnchor, container, anchor);
|
|
8819
8847
|
hostInsert(fragmentEndAnchor, container, anchor);
|
|
8820
8848
|
mountChildren(
|
|
8821
|
-
|
|
8849
|
+
// #10007
|
|
8850
|
+
// such fragment like `<></>` will be compiled into
|
|
8851
|
+
// a fragment which doesn't have a children.
|
|
8852
|
+
// In this case fallback to an empty array
|
|
8853
|
+
n2.children || [],
|
|
8822
8854
|
container,
|
|
8823
8855
|
fragmentEndAnchor,
|
|
8824
8856
|
parentComponent,
|
|
@@ -9686,6 +9718,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9686
9718
|
}
|
|
9687
9719
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9688
9720
|
};
|
|
9721
|
+
let isFlushing = false;
|
|
9689
9722
|
const render = (vnode, container, namespace) => {
|
|
9690
9723
|
if (vnode == null) {
|
|
9691
9724
|
if (container._vnode) {
|
|
@@ -9702,8 +9735,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
9702
9735
|
namespace
|
|
9703
9736
|
);
|
|
9704
9737
|
}
|
|
9705
|
-
|
|
9706
|
-
|
|
9738
|
+
if (!isFlushing) {
|
|
9739
|
+
isFlushing = true;
|
|
9740
|
+
flushPreFlushCbs();
|
|
9741
|
+
flushPostFlushCbs();
|
|
9742
|
+
isFlushing = false;
|
|
9743
|
+
}
|
|
9707
9744
|
container._vnode = vnode;
|
|
9708
9745
|
};
|
|
9709
9746
|
const internals = {
|
|
@@ -10619,8 +10656,13 @@ Component that was made reactive: `,
|
|
|
10619
10656
|
};
|
|
10620
10657
|
}
|
|
10621
10658
|
const setCurrentInstance = (instance) => {
|
|
10659
|
+
const prev = currentInstance;
|
|
10622
10660
|
internalSetCurrentInstance(instance);
|
|
10623
10661
|
instance.scope.on();
|
|
10662
|
+
return () => {
|
|
10663
|
+
instance.scope.off();
|
|
10664
|
+
internalSetCurrentInstance(prev);
|
|
10665
|
+
};
|
|
10624
10666
|
};
|
|
10625
10667
|
const unsetCurrentInstance = () => {
|
|
10626
10668
|
currentInstance && currentInstance.scope.off();
|
|
@@ -10682,7 +10724,7 @@ Component that was made reactive: `,
|
|
|
10682
10724
|
const { setup } = Component;
|
|
10683
10725
|
if (setup) {
|
|
10684
10726
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10685
|
-
setCurrentInstance(instance);
|
|
10727
|
+
const reset = setCurrentInstance(instance);
|
|
10686
10728
|
pauseTracking();
|
|
10687
10729
|
const setupResult = callWithErrorHandling(
|
|
10688
10730
|
setup,
|
|
@@ -10694,7 +10736,7 @@ Component that was made reactive: `,
|
|
|
10694
10736
|
]
|
|
10695
10737
|
);
|
|
10696
10738
|
resetTracking();
|
|
10697
|
-
|
|
10739
|
+
reset();
|
|
10698
10740
|
if (isPromise(setupResult)) {
|
|
10699
10741
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10700
10742
|
if (isSSR) {
|
|
@@ -10800,13 +10842,13 @@ Component that was made reactive: `,
|
|
|
10800
10842
|
}
|
|
10801
10843
|
}
|
|
10802
10844
|
if (!skipOptions) {
|
|
10803
|
-
setCurrentInstance(instance);
|
|
10845
|
+
const reset = setCurrentInstance(instance);
|
|
10804
10846
|
pauseTracking();
|
|
10805
10847
|
try {
|
|
10806
10848
|
applyOptions(instance);
|
|
10807
10849
|
} finally {
|
|
10808
10850
|
resetTracking();
|
|
10809
|
-
|
|
10851
|
+
reset();
|
|
10810
10852
|
}
|
|
10811
10853
|
}
|
|
10812
10854
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
@@ -11159,7 +11201,7 @@ Component that was made reactive: `,
|
|
|
11159
11201
|
return true;
|
|
11160
11202
|
}
|
|
11161
11203
|
|
|
11162
|
-
const version = "3.4.
|
|
11204
|
+
const version = "3.4.7";
|
|
11163
11205
|
const warn = warn$1 ;
|
|
11164
11206
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11165
11207
|
const devtools = devtools$1 ;
|
|
@@ -11600,6 +11642,9 @@ Component that was made reactive: `,
|
|
|
11600
11642
|
setDisplay(el, value);
|
|
11601
11643
|
}
|
|
11602
11644
|
};
|
|
11645
|
+
{
|
|
11646
|
+
vShow.name = "show";
|
|
11647
|
+
}
|
|
11603
11648
|
function setDisplay(el, value) {
|
|
11604
11649
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11605
11650
|
}
|