@vue/compat 3.5.22 → 3.5.24
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/README.md +0 -1
- package/dist/vue.cjs.js +89 -38
- package/dist/vue.cjs.prod.js +87 -36
- package/dist/vue.esm-browser.js +89 -38
- package/dist/vue.esm-browser.prod.js +10 -9
- package/dist/vue.esm-bundler.js +92 -41
- package/dist/vue.global.js +89 -38
- package/dist/vue.global.prod.js +10 -9
- package/dist/vue.runtime.esm-browser.js +87 -37
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +90 -40
- package/dist/vue.runtime.global.js +87 -37
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -320,7 +320,6 @@ Features that start with `COMPILER_` are compiler-specific: if you are using the
|
|
|
320
320
|
| FILTERS | ✔ | Filters removed (this option affects only runtime filter APIs) | [link](https://v3-migration.vuejs.org/breaking-changes/filters.html) |
|
|
321
321
|
| COMPILER_IS_ON_ELEMENT | ✔ | `is` usage is now restricted to `<component>` only | [link](https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html) |
|
|
322
322
|
| COMPILER_V_BIND_SYNC | ✔ | `v-bind.sync` replaced by `v-model` with arguments | [link](https://v3-migration.vuejs.org/breaking-changes/v-model.html) |
|
|
323
|
-
| COMPILER_V_BIND_PROP | ✔ | `v-bind.prop` modifier removed | |
|
|
324
323
|
| COMPILER_V_BIND_OBJECT_ORDER | ✔ | `v-bind="object"` is now order sensitive | [link](https://v3-migration.vuejs.org/breaking-changes/v-bind.html) |
|
|
325
324
|
| COMPILER_V_ON_NATIVE | ✔ | `v-on.native` modifier removed | [link](https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html) |
|
|
326
325
|
| COMPILER_V_FOR_REF | ✔ | `ref` in `v-for` (compiler support) | |
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.24
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -4778,14 +4778,16 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4778
4778
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4779
4779
|
clientText = clientText.slice(1);
|
|
4780
4780
|
}
|
|
4781
|
-
|
|
4781
|
+
const { textContent } = el;
|
|
4782
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
4783
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
4782
4784
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
4783
4785
|
warn$1(
|
|
4784
4786
|
`Hydration text content mismatch on`,
|
|
4785
4787
|
el,
|
|
4786
4788
|
`
|
|
4787
|
-
- rendered on server: ${
|
|
4788
|
-
- expected on client: ${
|
|
4789
|
+
- rendered on server: ${textContent}
|
|
4790
|
+
- expected on client: ${clientText}`
|
|
4789
4791
|
);
|
|
4790
4792
|
logMismatchError();
|
|
4791
4793
|
}
|
|
@@ -5380,7 +5382,10 @@ function defineAsyncComponent(source) {
|
|
|
5380
5382
|
error: error.value
|
|
5381
5383
|
});
|
|
5382
5384
|
} else if (loadingComponent && !delayed.value) {
|
|
5383
|
-
return
|
|
5385
|
+
return createInnerComp(
|
|
5386
|
+
loadingComponent,
|
|
5387
|
+
instance
|
|
5388
|
+
);
|
|
5384
5389
|
}
|
|
5385
5390
|
};
|
|
5386
5391
|
}
|
|
@@ -7322,7 +7327,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7322
7327
|
return vm;
|
|
7323
7328
|
}
|
|
7324
7329
|
}
|
|
7325
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7330
|
+
Vue.version = `2.6.14-compat:${"3.5.24"}`;
|
|
7326
7331
|
Vue.config = singletonApp.config;
|
|
7327
7332
|
Vue.use = (plugin, ...options) => {
|
|
7328
7333
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8768,15 +8773,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8768
8773
|
optimized
|
|
8769
8774
|
);
|
|
8770
8775
|
} else {
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8776
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
8777
|
+
try {
|
|
8778
|
+
if (customElement) {
|
|
8779
|
+
customElement._beginPatch();
|
|
8780
|
+
}
|
|
8781
|
+
patchElement(
|
|
8782
|
+
n1,
|
|
8783
|
+
n2,
|
|
8784
|
+
parentComponent,
|
|
8785
|
+
parentSuspense,
|
|
8786
|
+
namespace,
|
|
8787
|
+
slotScopeIds,
|
|
8788
|
+
optimized
|
|
8789
|
+
);
|
|
8790
|
+
} finally {
|
|
8791
|
+
if (customElement) {
|
|
8792
|
+
customElement._endPatch();
|
|
8793
|
+
}
|
|
8794
|
+
}
|
|
8780
8795
|
}
|
|
8781
8796
|
};
|
|
8782
8797
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -11081,7 +11096,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11081
11096
|
pendingId,
|
|
11082
11097
|
effects,
|
|
11083
11098
|
parentComponent: parentComponent2,
|
|
11084
|
-
container: container2
|
|
11099
|
+
container: container2,
|
|
11100
|
+
isInFallback
|
|
11085
11101
|
} = suspense;
|
|
11086
11102
|
let delayEnter = false;
|
|
11087
11103
|
if (suspense.isHydrating) {
|
|
@@ -11098,6 +11114,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11098
11114
|
0
|
|
11099
11115
|
);
|
|
11100
11116
|
queuePostFlushCb(effects);
|
|
11117
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
11118
|
+
vnode2.ssFallback.el = null;
|
|
11119
|
+
}
|
|
11101
11120
|
}
|
|
11102
11121
|
};
|
|
11103
11122
|
}
|
|
@@ -11106,6 +11125,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11106
11125
|
anchor = next(activeBranch);
|
|
11107
11126
|
}
|
|
11108
11127
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
11128
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
11129
|
+
vnode2.ssFallback.el = null;
|
|
11130
|
+
}
|
|
11109
11131
|
}
|
|
11110
11132
|
if (!delayEnter) {
|
|
11111
11133
|
move(pendingBranch, container2, anchor, 0);
|
|
@@ -11224,6 +11246,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11224
11246
|
optimized2
|
|
11225
11247
|
);
|
|
11226
11248
|
if (placeholder) {
|
|
11249
|
+
vnode2.placeholder = null;
|
|
11227
11250
|
remove(placeholder);
|
|
11228
11251
|
}
|
|
11229
11252
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -12478,7 +12501,7 @@ function isMemoSame(cached, memo) {
|
|
|
12478
12501
|
return true;
|
|
12479
12502
|
}
|
|
12480
12503
|
|
|
12481
|
-
const version = "3.5.
|
|
12504
|
+
const version = "3.5.24";
|
|
12482
12505
|
const warn = warn$1 ;
|
|
12483
12506
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12484
12507
|
const devtools = devtools$1 ;
|
|
@@ -13320,6 +13343,9 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13320
13343
|
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
|
|
13321
13344
|
return false;
|
|
13322
13345
|
}
|
|
13346
|
+
if (key === "sandbox" && el.tagName === "IFRAME") {
|
|
13347
|
+
return false;
|
|
13348
|
+
}
|
|
13323
13349
|
if (key === "form") {
|
|
13324
13350
|
return false;
|
|
13325
13351
|
}
|
|
@@ -13380,6 +13406,8 @@ class VueElement extends BaseClass {
|
|
|
13380
13406
|
this._nonce = this._def.nonce;
|
|
13381
13407
|
this._connected = false;
|
|
13382
13408
|
this._resolved = false;
|
|
13409
|
+
this._patching = false;
|
|
13410
|
+
this._dirty = false;
|
|
13383
13411
|
this._numberProps = null;
|
|
13384
13412
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13385
13413
|
this._ob = null;
|
|
@@ -13555,7 +13583,7 @@ class VueElement extends BaseClass {
|
|
|
13555
13583
|
return this._getProp(key);
|
|
13556
13584
|
},
|
|
13557
13585
|
set(val) {
|
|
13558
|
-
this._setProp(key, val, true,
|
|
13586
|
+
this._setProp(key, val, true, !this._patching);
|
|
13559
13587
|
}
|
|
13560
13588
|
});
|
|
13561
13589
|
}
|
|
@@ -13581,6 +13609,7 @@ class VueElement extends BaseClass {
|
|
|
13581
13609
|
*/
|
|
13582
13610
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
13583
13611
|
if (val !== this._props[key]) {
|
|
13612
|
+
this._dirty = true;
|
|
13584
13613
|
if (val === REMOVAL) {
|
|
13585
13614
|
delete this._props[key];
|
|
13586
13615
|
} else {
|
|
@@ -13735,10 +13764,14 @@ class VueElement extends BaseClass {
|
|
|
13735
13764
|
if (this._teleportTargets) {
|
|
13736
13765
|
roots.push(...this._teleportTargets);
|
|
13737
13766
|
}
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13767
|
+
const slots = /* @__PURE__ */ new Set();
|
|
13768
|
+
for (const root of roots) {
|
|
13769
|
+
const found = root.querySelectorAll("slot");
|
|
13770
|
+
for (let i = 0; i < found.length; i++) {
|
|
13771
|
+
slots.add(found[i]);
|
|
13772
|
+
}
|
|
13773
|
+
}
|
|
13774
|
+
return Array.from(slots);
|
|
13742
13775
|
}
|
|
13743
13776
|
/**
|
|
13744
13777
|
* @internal
|
|
@@ -13746,6 +13779,22 @@ class VueElement extends BaseClass {
|
|
|
13746
13779
|
_injectChildStyle(comp) {
|
|
13747
13780
|
this._applyStyles(comp.styles, comp);
|
|
13748
13781
|
}
|
|
13782
|
+
/**
|
|
13783
|
+
* @internal
|
|
13784
|
+
*/
|
|
13785
|
+
_beginPatch() {
|
|
13786
|
+
this._patching = true;
|
|
13787
|
+
this._dirty = false;
|
|
13788
|
+
}
|
|
13789
|
+
/**
|
|
13790
|
+
* @internal
|
|
13791
|
+
*/
|
|
13792
|
+
_endPatch() {
|
|
13793
|
+
this._patching = false;
|
|
13794
|
+
if (this._dirty && this._instance) {
|
|
13795
|
+
this._update();
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13749
13798
|
/**
|
|
13750
13799
|
* @internal
|
|
13751
13800
|
*/
|
|
@@ -13889,10 +13938,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
13889
13938
|
instance
|
|
13890
13939
|
)
|
|
13891
13940
|
);
|
|
13892
|
-
positionMap.set(
|
|
13893
|
-
child,
|
|
13894
|
-
child.el.
|
|
13895
|
-
);
|
|
13941
|
+
positionMap.set(child, {
|
|
13942
|
+
left: child.el.offsetLeft,
|
|
13943
|
+
top: child.el.offsetTop
|
|
13944
|
+
});
|
|
13896
13945
|
}
|
|
13897
13946
|
}
|
|
13898
13947
|
}
|
|
@@ -13923,7 +13972,10 @@ function callPendingCbs(c) {
|
|
|
13923
13972
|
}
|
|
13924
13973
|
}
|
|
13925
13974
|
function recordPosition(c) {
|
|
13926
|
-
newPositionMap.set(c,
|
|
13975
|
+
newPositionMap.set(c, {
|
|
13976
|
+
left: c.el.offsetLeft,
|
|
13977
|
+
top: c.el.offsetTop
|
|
13978
|
+
});
|
|
13927
13979
|
}
|
|
13928
13980
|
function applyTranslation(c) {
|
|
13929
13981
|
const oldPos = positionMap.get(c);
|
|
@@ -13969,24 +14021,22 @@ function onCompositionEnd(e) {
|
|
|
13969
14021
|
}
|
|
13970
14022
|
}
|
|
13971
14023
|
const assignKey = Symbol("_assign");
|
|
14024
|
+
function castValue(value, trim, number) {
|
|
14025
|
+
if (trim) value = value.trim();
|
|
14026
|
+
if (number) value = looseToNumber(value);
|
|
14027
|
+
return value;
|
|
14028
|
+
}
|
|
13972
14029
|
const vModelText = {
|
|
13973
14030
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
13974
14031
|
el[assignKey] = getModelAssigner(vnode);
|
|
13975
14032
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
13976
14033
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
13977
14034
|
if (e.target.composing) return;
|
|
13978
|
-
|
|
13979
|
-
if (trim) {
|
|
13980
|
-
domValue = domValue.trim();
|
|
13981
|
-
}
|
|
13982
|
-
if (castToNumber) {
|
|
13983
|
-
domValue = looseToNumber(domValue);
|
|
13984
|
-
}
|
|
13985
|
-
el[assignKey](domValue);
|
|
14035
|
+
el[assignKey](castValue(el.value, trim, castToNumber));
|
|
13986
14036
|
});
|
|
13987
|
-
if (trim) {
|
|
14037
|
+
if (trim || castToNumber) {
|
|
13988
14038
|
addEventListener(el, "change", () => {
|
|
13989
|
-
el.value = el.value
|
|
14039
|
+
el.value = castValue(el.value, trim, castToNumber);
|
|
13990
14040
|
});
|
|
13991
14041
|
}
|
|
13992
14042
|
if (!lazy) {
|
|
@@ -20937,7 +20987,8 @@ const transformMemo = (node, context) => {
|
|
|
20937
20987
|
const transformVBindShorthand = (node, context) => {
|
|
20938
20988
|
if (node.type === 1) {
|
|
20939
20989
|
for (const prop of node.props) {
|
|
20940
|
-
if (prop.type === 7 && prop.name === "bind" && !prop.exp
|
|
20990
|
+
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
20991
|
+
false) && prop.arg) {
|
|
20941
20992
|
const arg = prop.arg;
|
|
20942
20993
|
if (arg.type !== 4 || !arg.isStatic) {
|
|
20943
20994
|
context.onError(
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.24
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3767,7 +3767,9 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3767
3767
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
3768
3768
|
clientText = clientText.slice(1);
|
|
3769
3769
|
}
|
|
3770
|
-
|
|
3770
|
+
const { textContent } = el;
|
|
3771
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
3772
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
3771
3773
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
3772
3774
|
logMismatchError();
|
|
3773
3775
|
}
|
|
@@ -4213,7 +4215,10 @@ function defineAsyncComponent(source) {
|
|
|
4213
4215
|
error: error.value
|
|
4214
4216
|
});
|
|
4215
4217
|
} else if (loadingComponent && !delayed.value) {
|
|
4216
|
-
return
|
|
4218
|
+
return createInnerComp(
|
|
4219
|
+
loadingComponent,
|
|
4220
|
+
instance
|
|
4221
|
+
);
|
|
4217
4222
|
}
|
|
4218
4223
|
};
|
|
4219
4224
|
}
|
|
@@ -5867,7 +5872,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5867
5872
|
return vm;
|
|
5868
5873
|
}
|
|
5869
5874
|
}
|
|
5870
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
5875
|
+
Vue.version = `2.6.14-compat:${"3.5.24"}`;
|
|
5871
5876
|
Vue.config = singletonApp.config;
|
|
5872
5877
|
Vue.use = (plugin, ...options) => {
|
|
5873
5878
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -6982,15 +6987,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6982
6987
|
optimized
|
|
6983
6988
|
);
|
|
6984
6989
|
} else {
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6990
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
6991
|
+
try {
|
|
6992
|
+
if (customElement) {
|
|
6993
|
+
customElement._beginPatch();
|
|
6994
|
+
}
|
|
6995
|
+
patchElement(
|
|
6996
|
+
n1,
|
|
6997
|
+
n2,
|
|
6998
|
+
parentComponent,
|
|
6999
|
+
parentSuspense,
|
|
7000
|
+
namespace,
|
|
7001
|
+
slotScopeIds,
|
|
7002
|
+
optimized
|
|
7003
|
+
);
|
|
7004
|
+
} finally {
|
|
7005
|
+
if (customElement) {
|
|
7006
|
+
customElement._endPatch();
|
|
7007
|
+
}
|
|
7008
|
+
}
|
|
6994
7009
|
}
|
|
6995
7010
|
};
|
|
6996
7011
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -8995,7 +9010,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8995
9010
|
pendingId,
|
|
8996
9011
|
effects,
|
|
8997
9012
|
parentComponent: parentComponent2,
|
|
8998
|
-
container: container2
|
|
9013
|
+
container: container2,
|
|
9014
|
+
isInFallback
|
|
8999
9015
|
} = suspense;
|
|
9000
9016
|
let delayEnter = false;
|
|
9001
9017
|
if (suspense.isHydrating) {
|
|
@@ -9012,6 +9028,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9012
9028
|
0
|
|
9013
9029
|
);
|
|
9014
9030
|
queuePostFlushCb(effects);
|
|
9031
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
9032
|
+
vnode2.ssFallback.el = null;
|
|
9033
|
+
}
|
|
9015
9034
|
}
|
|
9016
9035
|
};
|
|
9017
9036
|
}
|
|
@@ -9020,6 +9039,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9020
9039
|
anchor = next(activeBranch);
|
|
9021
9040
|
}
|
|
9022
9041
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
9042
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
9043
|
+
vnode2.ssFallback.el = null;
|
|
9044
|
+
}
|
|
9023
9045
|
}
|
|
9024
9046
|
if (!delayEnter) {
|
|
9025
9047
|
move(pendingBranch, container2, anchor, 0);
|
|
@@ -9135,6 +9157,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9135
9157
|
optimized2
|
|
9136
9158
|
);
|
|
9137
9159
|
if (placeholder) {
|
|
9160
|
+
vnode2.placeholder = null;
|
|
9138
9161
|
remove(placeholder);
|
|
9139
9162
|
}
|
|
9140
9163
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -10024,7 +10047,7 @@ function isMemoSame(cached, memo) {
|
|
|
10024
10047
|
return true;
|
|
10025
10048
|
}
|
|
10026
10049
|
|
|
10027
|
-
const version = "3.5.
|
|
10050
|
+
const version = "3.5.24";
|
|
10028
10051
|
const warn$1 = NOOP;
|
|
10029
10052
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10030
10053
|
const devtools = void 0;
|
|
@@ -10833,6 +10856,9 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
10833
10856
|
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
|
|
10834
10857
|
return false;
|
|
10835
10858
|
}
|
|
10859
|
+
if (key === "sandbox" && el.tagName === "IFRAME") {
|
|
10860
|
+
return false;
|
|
10861
|
+
}
|
|
10836
10862
|
if (key === "form") {
|
|
10837
10863
|
return false;
|
|
10838
10864
|
}
|
|
@@ -10893,6 +10919,8 @@ class VueElement extends BaseClass {
|
|
|
10893
10919
|
this._nonce = this._def.nonce;
|
|
10894
10920
|
this._connected = false;
|
|
10895
10921
|
this._resolved = false;
|
|
10922
|
+
this._patching = false;
|
|
10923
|
+
this._dirty = false;
|
|
10896
10924
|
this._numberProps = null;
|
|
10897
10925
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
10898
10926
|
this._ob = null;
|
|
@@ -11054,7 +11082,7 @@ class VueElement extends BaseClass {
|
|
|
11054
11082
|
return this._getProp(key);
|
|
11055
11083
|
},
|
|
11056
11084
|
set(val) {
|
|
11057
|
-
this._setProp(key, val, true,
|
|
11085
|
+
this._setProp(key, val, true, !this._patching);
|
|
11058
11086
|
}
|
|
11059
11087
|
});
|
|
11060
11088
|
}
|
|
@@ -11080,6 +11108,7 @@ class VueElement extends BaseClass {
|
|
|
11080
11108
|
*/
|
|
11081
11109
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
11082
11110
|
if (val !== this._props[key]) {
|
|
11111
|
+
this._dirty = true;
|
|
11083
11112
|
if (val === REMOVAL) {
|
|
11084
11113
|
delete this._props[key];
|
|
11085
11114
|
} else {
|
|
@@ -11209,10 +11238,14 @@ class VueElement extends BaseClass {
|
|
|
11209
11238
|
if (this._teleportTargets) {
|
|
11210
11239
|
roots.push(...this._teleportTargets);
|
|
11211
11240
|
}
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11241
|
+
const slots = /* @__PURE__ */ new Set();
|
|
11242
|
+
for (const root of roots) {
|
|
11243
|
+
const found = root.querySelectorAll("slot");
|
|
11244
|
+
for (let i = 0; i < found.length; i++) {
|
|
11245
|
+
slots.add(found[i]);
|
|
11246
|
+
}
|
|
11247
|
+
}
|
|
11248
|
+
return Array.from(slots);
|
|
11216
11249
|
}
|
|
11217
11250
|
/**
|
|
11218
11251
|
* @internal
|
|
@@ -11220,6 +11253,22 @@ class VueElement extends BaseClass {
|
|
|
11220
11253
|
_injectChildStyle(comp) {
|
|
11221
11254
|
this._applyStyles(comp.styles, comp);
|
|
11222
11255
|
}
|
|
11256
|
+
/**
|
|
11257
|
+
* @internal
|
|
11258
|
+
*/
|
|
11259
|
+
_beginPatch() {
|
|
11260
|
+
this._patching = true;
|
|
11261
|
+
this._dirty = false;
|
|
11262
|
+
}
|
|
11263
|
+
/**
|
|
11264
|
+
* @internal
|
|
11265
|
+
*/
|
|
11266
|
+
_endPatch() {
|
|
11267
|
+
this._patching = false;
|
|
11268
|
+
if (this._dirty && this._instance) {
|
|
11269
|
+
this._update();
|
|
11270
|
+
}
|
|
11271
|
+
}
|
|
11223
11272
|
/**
|
|
11224
11273
|
* @internal
|
|
11225
11274
|
*/
|
|
@@ -11340,10 +11389,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11340
11389
|
instance
|
|
11341
11390
|
)
|
|
11342
11391
|
);
|
|
11343
|
-
positionMap.set(
|
|
11344
|
-
child,
|
|
11345
|
-
child.el.
|
|
11346
|
-
);
|
|
11392
|
+
positionMap.set(child, {
|
|
11393
|
+
left: child.el.offsetLeft,
|
|
11394
|
+
top: child.el.offsetTop
|
|
11395
|
+
});
|
|
11347
11396
|
}
|
|
11348
11397
|
}
|
|
11349
11398
|
}
|
|
@@ -11372,7 +11421,10 @@ function callPendingCbs(c) {
|
|
|
11372
11421
|
}
|
|
11373
11422
|
}
|
|
11374
11423
|
function recordPosition(c) {
|
|
11375
|
-
newPositionMap.set(c,
|
|
11424
|
+
newPositionMap.set(c, {
|
|
11425
|
+
left: c.el.offsetLeft,
|
|
11426
|
+
top: c.el.offsetTop
|
|
11427
|
+
});
|
|
11376
11428
|
}
|
|
11377
11429
|
function applyTranslation(c) {
|
|
11378
11430
|
const oldPos = positionMap.get(c);
|
|
@@ -11418,24 +11470,22 @@ function onCompositionEnd(e) {
|
|
|
11418
11470
|
}
|
|
11419
11471
|
}
|
|
11420
11472
|
const assignKey = Symbol("_assign");
|
|
11473
|
+
function castValue(value, trim, number) {
|
|
11474
|
+
if (trim) value = value.trim();
|
|
11475
|
+
if (number) value = looseToNumber(value);
|
|
11476
|
+
return value;
|
|
11477
|
+
}
|
|
11421
11478
|
const vModelText = {
|
|
11422
11479
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
11423
11480
|
el[assignKey] = getModelAssigner(vnode);
|
|
11424
11481
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
11425
11482
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
11426
11483
|
if (e.target.composing) return;
|
|
11427
|
-
|
|
11428
|
-
if (trim) {
|
|
11429
|
-
domValue = domValue.trim();
|
|
11430
|
-
}
|
|
11431
|
-
if (castToNumber) {
|
|
11432
|
-
domValue = looseToNumber(domValue);
|
|
11433
|
-
}
|
|
11434
|
-
el[assignKey](domValue);
|
|
11484
|
+
el[assignKey](castValue(el.value, trim, castToNumber));
|
|
11435
11485
|
});
|
|
11436
|
-
if (trim) {
|
|
11486
|
+
if (trim || castToNumber) {
|
|
11437
11487
|
addEventListener(el, "change", () => {
|
|
11438
|
-
el.value = el.value
|
|
11488
|
+
el.value = castValue(el.value, trim, castToNumber);
|
|
11439
11489
|
});
|
|
11440
11490
|
}
|
|
11441
11491
|
if (!lazy) {
|
|
@@ -18138,7 +18188,8 @@ const transformMemo = (node, context) => {
|
|
|
18138
18188
|
const transformVBindShorthand = (node, context) => {
|
|
18139
18189
|
if (node.type === 1) {
|
|
18140
18190
|
for (const prop of node.props) {
|
|
18141
|
-
if (prop.type === 7 && prop.name === "bind" && !prop.exp
|
|
18191
|
+
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
18192
|
+
false) && prop.arg) {
|
|
18142
18193
|
const arg = prop.arg;
|
|
18143
18194
|
if (arg.type !== 4 || !arg.isStatic) {
|
|
18144
18195
|
context.onError(
|