@vue/compat 3.5.37 → 3.5.39
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 +65 -26
- package/dist/vue.cjs.prod.js +71 -27
- package/dist/vue.esm-browser.js +65 -26
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +68 -28
- package/dist/vue.global.js +65 -26
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +64 -25
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +67 -27
- package/dist/vue.runtime.global.js +64 -25
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +2 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1497,7 +1497,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1497
1497
|
value,
|
|
1498
1498
|
isRef(target) ? target : receiver
|
|
1499
1499
|
);
|
|
1500
|
-
if (target === toRaw(receiver)) {
|
|
1500
|
+
if (target === toRaw(receiver) && result) {
|
|
1501
1501
|
if (!hadKey) {
|
|
1502
1502
|
trigger(target, "add", key, value);
|
|
1503
1503
|
} else if (hasChanged(value, oldValue)) {
|
|
@@ -3976,11 +3976,9 @@ const TeleportImpl = {
|
|
|
3976
3976
|
}
|
|
3977
3977
|
} else {
|
|
3978
3978
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
3979
|
-
const nextTarget = n2.
|
|
3980
|
-
n2.props,
|
|
3981
|
-
querySelector
|
|
3982
|
-
);
|
|
3979
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
3983
3980
|
if (nextTarget) {
|
|
3981
|
+
n2.target = nextTarget;
|
|
3984
3982
|
moveTeleport(
|
|
3985
3983
|
n2,
|
|
3986
3984
|
nextTarget,
|
|
@@ -4018,7 +4016,8 @@ const TeleportImpl = {
|
|
|
4018
4016
|
target,
|
|
4019
4017
|
props
|
|
4020
4018
|
} = vnode;
|
|
4021
|
-
const
|
|
4019
|
+
const disabled = isTeleportDisabled(props);
|
|
4020
|
+
const shouldRemove = doRemove || !disabled;
|
|
4022
4021
|
const pendingMount = pendingMounts.get(vnode);
|
|
4023
4022
|
if (pendingMount) {
|
|
4024
4023
|
pendingMount.flags |= 8;
|
|
@@ -4029,7 +4028,7 @@ const TeleportImpl = {
|
|
|
4029
4028
|
hostRemove(targetAnchor);
|
|
4030
4029
|
}
|
|
4031
4030
|
doRemove && hostRemove(anchor);
|
|
4032
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
4031
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
4033
4032
|
for (let i = 0; i < children.length; i++) {
|
|
4034
4033
|
const child = children[i];
|
|
4035
4034
|
unmount(
|
|
@@ -4675,7 +4674,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4675
4674
|
}
|
|
4676
4675
|
}
|
|
4677
4676
|
if (isFunction(ref)) {
|
|
4678
|
-
|
|
4677
|
+
pauseTracking();
|
|
4678
|
+
try {
|
|
4679
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4680
|
+
} finally {
|
|
4681
|
+
resetTracking();
|
|
4682
|
+
}
|
|
4679
4683
|
} else {
|
|
4680
4684
|
const _isString = isString(ref);
|
|
4681
4685
|
const _isRef = isRef(ref);
|
|
@@ -4967,7 +4971,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4967
4971
|
};
|
|
4968
4972
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
4969
4973
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4970
|
-
const {
|
|
4974
|
+
const {
|
|
4975
|
+
type,
|
|
4976
|
+
dynamicProps,
|
|
4977
|
+
props,
|
|
4978
|
+
patchFlag,
|
|
4979
|
+
shapeFlag,
|
|
4980
|
+
dirs,
|
|
4981
|
+
transition
|
|
4982
|
+
} = vnode;
|
|
4971
4983
|
const forcePatch = type === "input" || type === "option";
|
|
4972
4984
|
{
|
|
4973
4985
|
if (dirs) {
|
|
@@ -5045,7 +5057,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
5045
5057
|
logMismatchError();
|
|
5046
5058
|
}
|
|
5047
5059
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
5048
|
-
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
5060
|
+
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
5049
5061
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
5050
5062
|
}
|
|
5051
5063
|
}
|
|
@@ -5150,7 +5162,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5150
5162
|
}
|
|
5151
5163
|
};
|
|
5152
5164
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
5153
|
-
if (!
|
|
5165
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
5154
5166
|
warn$1(
|
|
5155
5167
|
`Hydration node mismatch:
|
|
5156
5168
|
- rendered on server:`,
|
|
@@ -5365,7 +5377,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5365
5377
|
el = el.parentElement;
|
|
5366
5378
|
}
|
|
5367
5379
|
}
|
|
5368
|
-
|
|
5380
|
+
return isMismatchAllowedByAttr(
|
|
5381
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
5382
|
+
allowedType
|
|
5383
|
+
);
|
|
5384
|
+
}
|
|
5385
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
5369
5386
|
if (allowedAttr == null) {
|
|
5370
5387
|
return false;
|
|
5371
5388
|
} else if (allowedAttr === "") {
|
|
@@ -5378,6 +5395,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5378
5395
|
return list.includes(MismatchTypeString[allowedType]);
|
|
5379
5396
|
}
|
|
5380
5397
|
}
|
|
5398
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
5399
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
5400
|
+
}
|
|
5401
|
+
function isMismatchAllowedByNode(node) {
|
|
5402
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
5403
|
+
node.getAttribute(allowMismatchAttr),
|
|
5404
|
+
1 /* CHILDREN */
|
|
5405
|
+
);
|
|
5406
|
+
}
|
|
5407
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
5408
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
5409
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
5410
|
+
}
|
|
5381
5411
|
|
|
5382
5412
|
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
5383
5413
|
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -7606,7 +7636,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7606
7636
|
return vm;
|
|
7607
7637
|
}
|
|
7608
7638
|
}
|
|
7609
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7639
|
+
Vue.version = `2.6.14-compat:${"3.5.39"}`;
|
|
7610
7640
|
Vue.config = singletonApp.config;
|
|
7611
7641
|
Vue.use = (plugin, ...options) => {
|
|
7612
7642
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8467,7 +8497,8 @@ function isEmitListener(options, key) {
|
|
|
8467
8497
|
if (key.startsWith(compatModelEventPrefix)) {
|
|
8468
8498
|
return true;
|
|
8469
8499
|
}
|
|
8470
|
-
key = key.slice(2)
|
|
8500
|
+
key = key.slice(2);
|
|
8501
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
8471
8502
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
8472
8503
|
}
|
|
8473
8504
|
|
|
@@ -9784,7 +9815,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9784
9815
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
9785
9816
|
}
|
|
9786
9817
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
9787
|
-
if (
|
|
9818
|
+
if (
|
|
9819
|
+
// HMR updated, force full diff
|
|
9820
|
+
isHmrUpdating || // #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
9821
|
+
// Force full diff when block metadata is unstable.
|
|
9822
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
9823
|
+
) {
|
|
9788
9824
|
patchFlag = 0;
|
|
9789
9825
|
optimized = false;
|
|
9790
9826
|
dynamicChildren = null;
|
|
@@ -12018,6 +12054,10 @@ function normalizeChildren(vnode, children) {
|
|
|
12018
12054
|
}
|
|
12019
12055
|
}
|
|
12020
12056
|
} else if (isFunction(children)) {
|
|
12057
|
+
if (shapeFlag & (1 | 64)) {
|
|
12058
|
+
normalizeChildren(vnode, { default: children });
|
|
12059
|
+
return;
|
|
12060
|
+
}
|
|
12021
12061
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
12022
12062
|
type = 32;
|
|
12023
12063
|
} else {
|
|
@@ -12748,7 +12788,7 @@ function isMemoSame(cached, memo) {
|
|
|
12748
12788
|
return true;
|
|
12749
12789
|
}
|
|
12750
12790
|
|
|
12751
|
-
const version = "3.5.
|
|
12791
|
+
const version = "3.5.39";
|
|
12752
12792
|
const warn = warn$1 ;
|
|
12753
12793
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12754
12794
|
const devtools = devtools$1 ;
|
|
@@ -13501,16 +13541,15 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
13501
13541
|
}
|
|
13502
13542
|
}
|
|
13503
13543
|
}
|
|
13504
|
-
const optionsModifierRE = /(
|
|
13544
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
13545
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
13505
13546
|
function parseName(name) {
|
|
13506
13547
|
let options;
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13510
|
-
|
|
13511
|
-
|
|
13512
|
-
options[m[0].toLowerCase()] = true;
|
|
13513
|
-
}
|
|
13548
|
+
let m;
|
|
13549
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
13550
|
+
if (!options) options = {};
|
|
13551
|
+
name = name.slice(0, name.length - m[1].length);
|
|
13552
|
+
options[m[1].toLowerCase()] = true;
|
|
13514
13553
|
}
|
|
13515
13554
|
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
13516
13555
|
return [event, options];
|
|
@@ -21190,7 +21229,7 @@ function rewriteFilter(node, context) {
|
|
|
21190
21229
|
if (child.type === 4) {
|
|
21191
21230
|
parseFilter(child, context);
|
|
21192
21231
|
} else if (child.type === 8) {
|
|
21193
|
-
rewriteFilter(
|
|
21232
|
+
rewriteFilter(child, context);
|
|
21194
21233
|
} else if (child.type === 5) {
|
|
21195
21234
|
rewriteFilter(child.content, context);
|
|
21196
21235
|
}
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1336,7 +1336,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1336
1336
|
value,
|
|
1337
1337
|
isRef(target) ? target : receiver
|
|
1338
1338
|
);
|
|
1339
|
-
if (target === toRaw(receiver)) {
|
|
1339
|
+
if (target === toRaw(receiver) && result) {
|
|
1340
1340
|
if (!hadKey) {
|
|
1341
1341
|
trigger(target, "add", key, value);
|
|
1342
1342
|
} else if (hasChanged(value, oldValue)) {
|
|
@@ -3014,11 +3014,9 @@ const TeleportImpl = {
|
|
|
3014
3014
|
}
|
|
3015
3015
|
} else {
|
|
3016
3016
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
3017
|
-
const nextTarget = n2.
|
|
3018
|
-
n2.props,
|
|
3019
|
-
querySelector
|
|
3020
|
-
);
|
|
3017
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
3021
3018
|
if (nextTarget) {
|
|
3019
|
+
n2.target = nextTarget;
|
|
3022
3020
|
moveTeleport(
|
|
3023
3021
|
n2,
|
|
3024
3022
|
nextTarget,
|
|
@@ -3050,7 +3048,8 @@ const TeleportImpl = {
|
|
|
3050
3048
|
target,
|
|
3051
3049
|
props
|
|
3052
3050
|
} = vnode;
|
|
3053
|
-
const
|
|
3051
|
+
const disabled = isTeleportDisabled(props);
|
|
3052
|
+
const shouldRemove = doRemove || !disabled;
|
|
3054
3053
|
const pendingMount = pendingMounts.get(vnode);
|
|
3055
3054
|
if (pendingMount) {
|
|
3056
3055
|
pendingMount.flags |= 8;
|
|
@@ -3061,7 +3060,7 @@ const TeleportImpl = {
|
|
|
3061
3060
|
hostRemove(targetAnchor);
|
|
3062
3061
|
}
|
|
3063
3062
|
doRemove && hostRemove(anchor);
|
|
3064
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
3063
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
3065
3064
|
for (let i = 0; i < children.length; i++) {
|
|
3066
3065
|
const child = children[i];
|
|
3067
3066
|
unmount(
|
|
@@ -3664,7 +3663,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3664
3663
|
}
|
|
3665
3664
|
}
|
|
3666
3665
|
if (isFunction(ref)) {
|
|
3667
|
-
|
|
3666
|
+
pauseTracking();
|
|
3667
|
+
try {
|
|
3668
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
3669
|
+
} finally {
|
|
3670
|
+
resetTracking();
|
|
3671
|
+
}
|
|
3668
3672
|
} else {
|
|
3669
3673
|
const _isString = isString(ref);
|
|
3670
3674
|
const _isRef = isRef(ref);
|
|
@@ -3934,9 +3938,18 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3934
3938
|
};
|
|
3935
3939
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
3936
3940
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
3937
|
-
const {
|
|
3941
|
+
const {
|
|
3942
|
+
type,
|
|
3943
|
+
dynamicProps,
|
|
3944
|
+
props,
|
|
3945
|
+
patchFlag,
|
|
3946
|
+
shapeFlag,
|
|
3947
|
+
dirs,
|
|
3948
|
+
transition
|
|
3949
|
+
} = vnode;
|
|
3938
3950
|
const forcePatch = type === "input" || type === "option";
|
|
3939
|
-
|
|
3951
|
+
const hasDynamicProps = !!dynamicProps;
|
|
3952
|
+
if (forcePatch || hasDynamicProps || patchFlag !== -1) {
|
|
3940
3953
|
if (dirs) {
|
|
3941
3954
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
3942
3955
|
}
|
|
@@ -3990,11 +4003,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3990
4003
|
}
|
|
3991
4004
|
}
|
|
3992
4005
|
if (props) {
|
|
3993
|
-
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
4006
|
+
if (forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
|
|
3994
4007
|
const isCustomElement = el.tagName.includes("-");
|
|
3995
4008
|
for (const key in props) {
|
|
3996
4009
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
3997
|
-
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
4010
|
+
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
3998
4011
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
3999
4012
|
}
|
|
4000
4013
|
}
|
|
@@ -4104,7 +4117,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4104
4117
|
}
|
|
4105
4118
|
};
|
|
4106
4119
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4107
|
-
if (!
|
|
4120
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4108
4121
|
logMismatchError();
|
|
4109
4122
|
}
|
|
4110
4123
|
vnode.el = null;
|
|
@@ -4187,7 +4200,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4187
4200
|
el = el.parentElement;
|
|
4188
4201
|
}
|
|
4189
4202
|
}
|
|
4190
|
-
|
|
4203
|
+
return isMismatchAllowedByAttr(
|
|
4204
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
4205
|
+
allowedType
|
|
4206
|
+
);
|
|
4207
|
+
}
|
|
4208
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
4191
4209
|
if (allowedAttr == null) {
|
|
4192
4210
|
return false;
|
|
4193
4211
|
} else if (allowedAttr === "") {
|
|
@@ -4200,6 +4218,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4200
4218
|
return list.includes(MismatchTypeString[allowedType]);
|
|
4201
4219
|
}
|
|
4202
4220
|
}
|
|
4221
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
4222
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
4223
|
+
}
|
|
4224
|
+
function isMismatchAllowedByNode(node) {
|
|
4225
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
4226
|
+
node.getAttribute(allowMismatchAttr),
|
|
4227
|
+
1 /* CHILDREN */
|
|
4228
|
+
);
|
|
4229
|
+
}
|
|
4230
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
4231
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
4232
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
4233
|
+
}
|
|
4203
4234
|
|
|
4204
4235
|
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4205
4236
|
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -6125,7 +6156,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6125
6156
|
return vm;
|
|
6126
6157
|
}
|
|
6127
6158
|
}
|
|
6128
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
6159
|
+
Vue.version = `2.6.14-compat:${"3.5.39"}`;
|
|
6129
6160
|
Vue.config = singletonApp.config;
|
|
6130
6161
|
Vue.use = (plugin, ...options) => {
|
|
6131
6162
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -6810,7 +6841,8 @@ function isEmitListener(options, key) {
|
|
|
6810
6841
|
if (key.startsWith(compatModelEventPrefix)) {
|
|
6811
6842
|
return true;
|
|
6812
6843
|
}
|
|
6813
|
-
key = key.slice(2)
|
|
6844
|
+
key = key.slice(2);
|
|
6845
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
6814
6846
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
6815
6847
|
}
|
|
6816
6848
|
|
|
@@ -7809,6 +7841,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7809
7841
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7810
7842
|
}
|
|
7811
7843
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7844
|
+
if (
|
|
7845
|
+
// #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
7846
|
+
// Force full diff when block metadata is unstable.
|
|
7847
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
7848
|
+
) {
|
|
7849
|
+
patchFlag = 0;
|
|
7850
|
+
optimized = false;
|
|
7851
|
+
dynamicChildren = null;
|
|
7852
|
+
}
|
|
7812
7853
|
if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
|
|
7813
7854
|
hostSetElementText(el, "");
|
|
7814
7855
|
}
|
|
@@ -9870,6 +9911,10 @@ function normalizeChildren(vnode, children) {
|
|
|
9870
9911
|
}
|
|
9871
9912
|
}
|
|
9872
9913
|
} else if (isFunction(children)) {
|
|
9914
|
+
if (shapeFlag & (1 | 64)) {
|
|
9915
|
+
normalizeChildren(vnode, { default: children });
|
|
9916
|
+
return;
|
|
9917
|
+
}
|
|
9873
9918
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
9874
9919
|
type = 32;
|
|
9875
9920
|
} else {
|
|
@@ -10279,7 +10324,7 @@ function isMemoSame(cached, memo) {
|
|
|
10279
10324
|
return true;
|
|
10280
10325
|
}
|
|
10281
10326
|
|
|
10282
|
-
const version = "3.5.
|
|
10327
|
+
const version = "3.5.39";
|
|
10283
10328
|
const warn$1 = NOOP;
|
|
10284
10329
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10285
10330
|
const devtools = void 0;
|
|
@@ -11009,16 +11054,15 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
11009
11054
|
}
|
|
11010
11055
|
}
|
|
11011
11056
|
}
|
|
11012
|
-
const optionsModifierRE = /(
|
|
11057
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
11058
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
11013
11059
|
function parseName(name) {
|
|
11014
11060
|
let options;
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
options[m[0].toLowerCase()] = true;
|
|
11021
|
-
}
|
|
11061
|
+
let m;
|
|
11062
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
11063
|
+
if (!options) options = {};
|
|
11064
|
+
name = name.slice(0, name.length - m[1].length);
|
|
11065
|
+
options[m[1].toLowerCase()] = true;
|
|
11022
11066
|
}
|
|
11023
11067
|
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11024
11068
|
return [event, options];
|
|
@@ -18377,7 +18421,7 @@ function rewriteFilter(node, context) {
|
|
|
18377
18421
|
if (child.type === 4) {
|
|
18378
18422
|
parseFilter(child, context);
|
|
18379
18423
|
} else if (child.type === 8) {
|
|
18380
|
-
rewriteFilter(
|
|
18424
|
+
rewriteFilter(child, context);
|
|
18381
18425
|
} else if (child.type === 5) {
|
|
18382
18426
|
rewriteFilter(child.content, context);
|
|
18383
18427
|
}
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1444,7 +1444,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1444
1444
|
value,
|
|
1445
1445
|
isRef(target) ? target : receiver
|
|
1446
1446
|
);
|
|
1447
|
-
if (target === toRaw(receiver)) {
|
|
1447
|
+
if (target === toRaw(receiver) && result) {
|
|
1448
1448
|
if (!hadKey) {
|
|
1449
1449
|
trigger(target, "add", key, value);
|
|
1450
1450
|
} else if (hasChanged(value, oldValue)) {
|
|
@@ -3923,11 +3923,9 @@ const TeleportImpl = {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
} else {
|
|
3925
3925
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
3926
|
-
const nextTarget = n2.
|
|
3927
|
-
n2.props,
|
|
3928
|
-
querySelector
|
|
3929
|
-
);
|
|
3926
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
3930
3927
|
if (nextTarget) {
|
|
3928
|
+
n2.target = nextTarget;
|
|
3931
3929
|
moveTeleport(
|
|
3932
3930
|
n2,
|
|
3933
3931
|
nextTarget,
|
|
@@ -3965,7 +3963,8 @@ const TeleportImpl = {
|
|
|
3965
3963
|
target,
|
|
3966
3964
|
props
|
|
3967
3965
|
} = vnode;
|
|
3968
|
-
const
|
|
3966
|
+
const disabled = isTeleportDisabled(props);
|
|
3967
|
+
const shouldRemove = doRemove || !disabled;
|
|
3969
3968
|
const pendingMount = pendingMounts.get(vnode);
|
|
3970
3969
|
if (pendingMount) {
|
|
3971
3970
|
pendingMount.flags |= 8;
|
|
@@ -3976,7 +3975,7 @@ const TeleportImpl = {
|
|
|
3976
3975
|
hostRemove(targetAnchor);
|
|
3977
3976
|
}
|
|
3978
3977
|
doRemove && hostRemove(anchor);
|
|
3979
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
3978
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
3980
3979
|
for (let i = 0; i < children.length; i++) {
|
|
3981
3980
|
const child = children[i];
|
|
3982
3981
|
unmount(
|
|
@@ -4622,7 +4621,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4622
4621
|
}
|
|
4623
4622
|
}
|
|
4624
4623
|
if (isFunction(ref)) {
|
|
4625
|
-
|
|
4624
|
+
pauseTracking();
|
|
4625
|
+
try {
|
|
4626
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4627
|
+
} finally {
|
|
4628
|
+
resetTracking();
|
|
4629
|
+
}
|
|
4626
4630
|
} else {
|
|
4627
4631
|
const _isString = isString(ref);
|
|
4628
4632
|
const _isRef = isRef(ref);
|
|
@@ -4914,7 +4918,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4914
4918
|
};
|
|
4915
4919
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
4916
4920
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4917
|
-
const {
|
|
4921
|
+
const {
|
|
4922
|
+
type,
|
|
4923
|
+
dynamicProps,
|
|
4924
|
+
props,
|
|
4925
|
+
patchFlag,
|
|
4926
|
+
shapeFlag,
|
|
4927
|
+
dirs,
|
|
4928
|
+
transition
|
|
4929
|
+
} = vnode;
|
|
4918
4930
|
const forcePatch = type === "input" || type === "option";
|
|
4919
4931
|
{
|
|
4920
4932
|
if (dirs) {
|
|
@@ -4992,7 +5004,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4992
5004
|
logMismatchError();
|
|
4993
5005
|
}
|
|
4994
5006
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4995
|
-
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
5007
|
+
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4996
5008
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4997
5009
|
}
|
|
4998
5010
|
}
|
|
@@ -5097,7 +5109,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5097
5109
|
}
|
|
5098
5110
|
};
|
|
5099
5111
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
5100
|
-
if (!
|
|
5112
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
5101
5113
|
warn$1(
|
|
5102
5114
|
`Hydration node mismatch:
|
|
5103
5115
|
- rendered on server:`,
|
|
@@ -5312,7 +5324,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5312
5324
|
el = el.parentElement;
|
|
5313
5325
|
}
|
|
5314
5326
|
}
|
|
5315
|
-
|
|
5327
|
+
return isMismatchAllowedByAttr(
|
|
5328
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
5329
|
+
allowedType
|
|
5330
|
+
);
|
|
5331
|
+
}
|
|
5332
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
5316
5333
|
if (allowedAttr == null) {
|
|
5317
5334
|
return false;
|
|
5318
5335
|
} else if (allowedAttr === "") {
|
|
@@ -5325,6 +5342,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5325
5342
|
return list.includes(MismatchTypeString[allowedType]);
|
|
5326
5343
|
}
|
|
5327
5344
|
}
|
|
5345
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
5346
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
5347
|
+
}
|
|
5348
|
+
function isMismatchAllowedByNode(node) {
|
|
5349
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
5350
|
+
node.getAttribute(allowMismatchAttr),
|
|
5351
|
+
1 /* CHILDREN */
|
|
5352
|
+
);
|
|
5353
|
+
}
|
|
5354
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
5355
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
5356
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
5357
|
+
}
|
|
5328
5358
|
|
|
5329
5359
|
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
5330
5360
|
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -7556,7 +7586,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7556
7586
|
return vm;
|
|
7557
7587
|
}
|
|
7558
7588
|
}
|
|
7559
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7589
|
+
Vue.version = `2.6.14-compat:${"3.5.39"}`;
|
|
7560
7590
|
Vue.config = singletonApp.config;
|
|
7561
7591
|
Vue.use = (plugin, ...options) => {
|
|
7562
7592
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8417,7 +8447,8 @@ function isEmitListener(options, key) {
|
|
|
8417
8447
|
if (key.startsWith(compatModelEventPrefix)) {
|
|
8418
8448
|
return true;
|
|
8419
8449
|
}
|
|
8420
|
-
key = key.slice(2)
|
|
8450
|
+
key = key.slice(2);
|
|
8451
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
8421
8452
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
8422
8453
|
}
|
|
8423
8454
|
|
|
@@ -9734,7 +9765,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9734
9765
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
9735
9766
|
}
|
|
9736
9767
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
9737
|
-
if (
|
|
9768
|
+
if (
|
|
9769
|
+
// HMR updated, force full diff
|
|
9770
|
+
isHmrUpdating || // #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
9771
|
+
// Force full diff when block metadata is unstable.
|
|
9772
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
9773
|
+
) {
|
|
9738
9774
|
patchFlag = 0;
|
|
9739
9775
|
optimized = false;
|
|
9740
9776
|
dynamicChildren = null;
|
|
@@ -11968,6 +12004,10 @@ function normalizeChildren(vnode, children) {
|
|
|
11968
12004
|
}
|
|
11969
12005
|
}
|
|
11970
12006
|
} else if (isFunction(children)) {
|
|
12007
|
+
if (shapeFlag & (1 | 64)) {
|
|
12008
|
+
normalizeChildren(vnode, { default: children });
|
|
12009
|
+
return;
|
|
12010
|
+
}
|
|
11971
12011
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
11972
12012
|
type = 32;
|
|
11973
12013
|
} else {
|
|
@@ -12698,7 +12738,7 @@ function isMemoSame(cached, memo) {
|
|
|
12698
12738
|
return true;
|
|
12699
12739
|
}
|
|
12700
12740
|
|
|
12701
|
-
const version = "3.5.
|
|
12741
|
+
const version = "3.5.39";
|
|
12702
12742
|
const warn = warn$1 ;
|
|
12703
12743
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12704
12744
|
const devtools = devtools$1 ;
|
|
@@ -13519,16 +13559,15 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
13519
13559
|
}
|
|
13520
13560
|
}
|
|
13521
13561
|
}
|
|
13522
|
-
const optionsModifierRE = /(
|
|
13562
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
13563
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
13523
13564
|
function parseName(name) {
|
|
13524
13565
|
let options;
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
options[m[0].toLowerCase()] = true;
|
|
13531
|
-
}
|
|
13566
|
+
let m;
|
|
13567
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
13568
|
+
if (!options) options = {};
|
|
13569
|
+
name = name.slice(0, name.length - m[1].length);
|
|
13570
|
+
options[m[1].toLowerCase()] = true;
|
|
13532
13571
|
}
|
|
13533
13572
|
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
13534
13573
|
return [event, options];
|
|
@@ -20146,7 +20185,7 @@ function rewriteFilter(node, context) {
|
|
|
20146
20185
|
if (child.type === 4) {
|
|
20147
20186
|
parseFilter(child, context);
|
|
20148
20187
|
} else if (child.type === 8) {
|
|
20149
|
-
rewriteFilter(
|
|
20188
|
+
rewriteFilter(child, context);
|
|
20150
20189
|
} else if (child.type === 5) {
|
|
20151
20190
|
rewriteFilter(child.content, context);
|
|
20152
20191
|
}
|