vue 3.4.19 → 3.4.20
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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +76 -68
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +76 -68
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +70 -59
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +70 -59
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.4.
|
|
2
|
+
* vue v3.4.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -795,20 +795,20 @@ function hasOwnProperty(key) {
|
|
|
795
795
|
return obj.hasOwnProperty(key);
|
|
796
796
|
}
|
|
797
797
|
class BaseReactiveHandler {
|
|
798
|
-
constructor(_isReadonly = false,
|
|
798
|
+
constructor(_isReadonly = false, _isShallow = false) {
|
|
799
799
|
this._isReadonly = _isReadonly;
|
|
800
|
-
this.
|
|
800
|
+
this._isShallow = _isShallow;
|
|
801
801
|
}
|
|
802
802
|
get(target, key, receiver) {
|
|
803
|
-
const isReadonly2 = this._isReadonly,
|
|
803
|
+
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
804
804
|
if (key === "__v_isReactive") {
|
|
805
805
|
return !isReadonly2;
|
|
806
806
|
} else if (key === "__v_isReadonly") {
|
|
807
807
|
return isReadonly2;
|
|
808
808
|
} else if (key === "__v_isShallow") {
|
|
809
|
-
return
|
|
809
|
+
return isShallow2;
|
|
810
810
|
} else if (key === "__v_raw") {
|
|
811
|
-
if (receiver === (isReadonly2 ?
|
|
811
|
+
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
812
812
|
// this means the reciever is a user proxy of the reactive proxy
|
|
813
813
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
814
814
|
return target;
|
|
@@ -831,7 +831,7 @@ class BaseReactiveHandler {
|
|
|
831
831
|
if (!isReadonly2) {
|
|
832
832
|
track(target, "get", key);
|
|
833
833
|
}
|
|
834
|
-
if (
|
|
834
|
+
if (isShallow2) {
|
|
835
835
|
return res;
|
|
836
836
|
}
|
|
837
837
|
if (isRef(res)) {
|
|
@@ -844,12 +844,12 @@ class BaseReactiveHandler {
|
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
847
|
-
constructor(
|
|
848
|
-
super(false,
|
|
847
|
+
constructor(isShallow2 = false) {
|
|
848
|
+
super(false, isShallow2);
|
|
849
849
|
}
|
|
850
850
|
set(target, key, value, receiver) {
|
|
851
851
|
let oldValue = target[key];
|
|
852
|
-
if (!this.
|
|
852
|
+
if (!this._isShallow) {
|
|
853
853
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
854
854
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
855
855
|
oldValue = toRaw(oldValue);
|
|
@@ -901,8 +901,8 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
904
|
-
constructor(
|
|
905
|
-
super(true,
|
|
904
|
+
constructor(isShallow2 = false) {
|
|
905
|
+
super(true, isShallow2);
|
|
906
906
|
}
|
|
907
907
|
set(target, key) {
|
|
908
908
|
{
|
|
@@ -1073,7 +1073,7 @@ function createReadonlyMethod(type) {
|
|
|
1073
1073
|
return function(...args) {
|
|
1074
1074
|
{
|
|
1075
1075
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1076
|
-
|
|
1076
|
+
warn$2(
|
|
1077
1077
|
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1078
1078
|
toRaw(this)
|
|
1079
1079
|
);
|
|
@@ -1211,7 +1211,7 @@ function checkIdentityKeys(target, has2, key) {
|
|
|
1211
1211
|
const rawKey = toRaw(key);
|
|
1212
1212
|
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
1213
1213
|
const type = toRawType(target);
|
|
1214
|
-
|
|
1214
|
+
warn$2(
|
|
1215
1215
|
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
1216
1216
|
);
|
|
1217
1217
|
}
|
|
@@ -1280,7 +1280,7 @@ function shallowReadonly(target) {
|
|
|
1280
1280
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1281
1281
|
if (!isObject(target)) {
|
|
1282
1282
|
{
|
|
1283
|
-
|
|
1283
|
+
warn$2(`value cannot be made reactive: ${String(target)}`);
|
|
1284
1284
|
}
|
|
1285
1285
|
return target;
|
|
1286
1286
|
}
|
|
@@ -1333,6 +1333,7 @@ const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
|
1333
1333
|
const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;
|
|
1334
1334
|
class ComputedRefImpl {
|
|
1335
1335
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1336
|
+
this.getter = getter;
|
|
1336
1337
|
this._setter = _setter;
|
|
1337
1338
|
this.dep = void 0;
|
|
1338
1339
|
this.__v_isRef = true;
|
|
@@ -1355,7 +1356,11 @@ class ComputedRefImpl {
|
|
|
1355
1356
|
}
|
|
1356
1357
|
trackRefValue(self);
|
|
1357
1358
|
if (self.effect._dirtyLevel >= 2) {
|
|
1358
|
-
|
|
1359
|
+
if (this._warnRecursive) {
|
|
1360
|
+
warn$2(COMPUTED_SIDE_EFFECT_WARN, `
|
|
1361
|
+
|
|
1362
|
+
getter: `, this.getter);
|
|
1363
|
+
}
|
|
1359
1364
|
triggerRefValue(self, 2);
|
|
1360
1365
|
}
|
|
1361
1366
|
return self._value;
|
|
@@ -1511,7 +1516,7 @@ function customRef(factory) {
|
|
|
1511
1516
|
}
|
|
1512
1517
|
function toRefs(object) {
|
|
1513
1518
|
if (!isProxy(object)) {
|
|
1514
|
-
|
|
1519
|
+
warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1515
1520
|
}
|
|
1516
1521
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1517
1522
|
for (const key in object) {
|
|
@@ -2762,6 +2767,8 @@ const SuspenseImpl = {
|
|
|
2762
2767
|
} else {
|
|
2763
2768
|
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2764
2769
|
n2.suspense = n1.suspense;
|
|
2770
|
+
n2.suspense.vnode = n2;
|
|
2771
|
+
n2.el = n1.el;
|
|
2765
2772
|
return;
|
|
2766
2773
|
}
|
|
2767
2774
|
patchSuspense(
|
|
@@ -3694,7 +3701,6 @@ const BaseTransitionImpl = {
|
|
|
3694
3701
|
setup(props, { slots }) {
|
|
3695
3702
|
const instance = getCurrentInstance();
|
|
3696
3703
|
const state = useTransitionState();
|
|
3697
|
-
let prevTransitionKey;
|
|
3698
3704
|
return () => {
|
|
3699
3705
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3700
3706
|
if (!children || !children.length) {
|
|
@@ -3737,18 +3743,7 @@ const BaseTransitionImpl = {
|
|
|
3737
3743
|
setTransitionHooks(innerChild, enterHooks);
|
|
3738
3744
|
const oldChild = instance.subTree;
|
|
3739
3745
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
3740
|
-
|
|
3741
|
-
const { getTransitionKey } = innerChild.type;
|
|
3742
|
-
if (getTransitionKey) {
|
|
3743
|
-
const key = getTransitionKey();
|
|
3744
|
-
if (prevTransitionKey === void 0) {
|
|
3745
|
-
prevTransitionKey = key;
|
|
3746
|
-
} else if (key !== prevTransitionKey) {
|
|
3747
|
-
prevTransitionKey = key;
|
|
3748
|
-
transitionKeyChanged = true;
|
|
3749
|
-
}
|
|
3750
|
-
}
|
|
3751
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
3746
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
3752
3747
|
const leavingHooks = resolveTransitionHooks(
|
|
3753
3748
|
oldInnerChild,
|
|
3754
3749
|
rawProps,
|
|
@@ -9025,9 +9020,8 @@ const unsetCurrentInstance = () => {
|
|
|
9025
9020
|
internalSetCurrentInstance(null);
|
|
9026
9021
|
};
|
|
9027
9022
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
9028
|
-
function validateComponentName(name,
|
|
9029
|
-
|
|
9030
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
9023
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
9024
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
9031
9025
|
warn$1(
|
|
9032
9026
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
9033
9027
|
);
|
|
@@ -9320,7 +9314,14 @@ function isClassComponent(value) {
|
|
|
9320
9314
|
}
|
|
9321
9315
|
|
|
9322
9316
|
const computed = (getterOrOptions, debugOptions) => {
|
|
9323
|
-
|
|
9317
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9318
|
+
{
|
|
9319
|
+
const i = getCurrentInstance();
|
|
9320
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
9321
|
+
c._warnRecursive = true;
|
|
9322
|
+
}
|
|
9323
|
+
}
|
|
9324
|
+
return c;
|
|
9324
9325
|
};
|
|
9325
9326
|
|
|
9326
9327
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -9598,7 +9599,7 @@ function isMemoSame(cached, memo) {
|
|
|
9598
9599
|
return true;
|
|
9599
9600
|
}
|
|
9600
9601
|
|
|
9601
|
-
const version = "3.4.
|
|
9602
|
+
const version = "3.4.20";
|
|
9602
9603
|
const warn = warn$1 ;
|
|
9603
9604
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9604
9605
|
const devtools = devtools$1 ;
|
|
@@ -9959,10 +9960,11 @@ function patchClass(el, value, isSVG) {
|
|
|
9959
9960
|
}
|
|
9960
9961
|
}
|
|
9961
9962
|
|
|
9962
|
-
const
|
|
9963
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
9964
|
+
const vShowHidden = Symbol("_vsh");
|
|
9963
9965
|
const vShow = {
|
|
9964
9966
|
beforeMount(el, { value }, { transition }) {
|
|
9965
|
-
el[
|
|
9967
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
9966
9968
|
if (transition && value) {
|
|
9967
9969
|
transition.beforeEnter(el);
|
|
9968
9970
|
} else {
|
|
@@ -9975,7 +9977,7 @@ const vShow = {
|
|
|
9975
9977
|
}
|
|
9976
9978
|
},
|
|
9977
9979
|
updated(el, { value, oldValue }, { transition }) {
|
|
9978
|
-
if (!value === !oldValue
|
|
9980
|
+
if (!value === !oldValue)
|
|
9979
9981
|
return;
|
|
9980
9982
|
if (transition) {
|
|
9981
9983
|
if (value) {
|
|
@@ -9999,7 +10001,8 @@ const vShow = {
|
|
|
9999
10001
|
vShow.name = "show";
|
|
10000
10002
|
}
|
|
10001
10003
|
function setDisplay(el, value) {
|
|
10002
|
-
el.style.display = value ? el[
|
|
10004
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
10005
|
+
el[vShowHidden] = !value;
|
|
10003
10006
|
}
|
|
10004
10007
|
|
|
10005
10008
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
@@ -10072,13 +10075,21 @@ const displayRE = /(^|;)\s*display\s*:/;
|
|
|
10072
10075
|
function patchStyle(el, prev, next) {
|
|
10073
10076
|
const style = el.style;
|
|
10074
10077
|
const isCssString = isString(next);
|
|
10075
|
-
const currentDisplay = style.display;
|
|
10076
10078
|
let hasControlledDisplay = false;
|
|
10077
10079
|
if (next && !isCssString) {
|
|
10078
|
-
if (prev
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10080
|
+
if (prev) {
|
|
10081
|
+
if (!isString(prev)) {
|
|
10082
|
+
for (const key in prev) {
|
|
10083
|
+
if (next[key] == null) {
|
|
10084
|
+
setStyle(style, key, "");
|
|
10085
|
+
}
|
|
10086
|
+
}
|
|
10087
|
+
} else {
|
|
10088
|
+
for (const prevStyle of prev.split(";")) {
|
|
10089
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10090
|
+
if (next[key] == null) {
|
|
10091
|
+
setStyle(style, key, "");
|
|
10092
|
+
}
|
|
10082
10093
|
}
|
|
10083
10094
|
}
|
|
10084
10095
|
}
|
|
@@ -10102,9 +10113,11 @@ function patchStyle(el, prev, next) {
|
|
|
10102
10113
|
el.removeAttribute("style");
|
|
10103
10114
|
}
|
|
10104
10115
|
}
|
|
10105
|
-
if (
|
|
10106
|
-
el[
|
|
10107
|
-
|
|
10116
|
+
if (vShowOriginalDisplay in el) {
|
|
10117
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10118
|
+
if (el[vShowHidden]) {
|
|
10119
|
+
style.display = "none";
|
|
10120
|
+
}
|
|
10108
10121
|
}
|
|
10109
10122
|
}
|
|
10110
10123
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -10189,7 +10202,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
10189
10202
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
10190
10203
|
!tag.includes("-")) {
|
|
10191
10204
|
el._value = value;
|
|
10192
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
10205
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
10193
10206
|
const newValue = value == null ? "" : value;
|
|
10194
10207
|
if (oldValue !== newValue) {
|
|
10195
10208
|
el.value = newValue;
|
|
@@ -10880,19 +10893,19 @@ const vModelSelect = {
|
|
|
10880
10893
|
},
|
|
10881
10894
|
// set value in mounted & updated because <select> relies on its children
|
|
10882
10895
|
// <option>s.
|
|
10883
|
-
mounted(el, { value,
|
|
10884
|
-
setSelected(el, value,
|
|
10896
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
10897
|
+
setSelected(el, value, number);
|
|
10885
10898
|
},
|
|
10886
10899
|
beforeUpdate(el, _binding, vnode) {
|
|
10887
10900
|
el[assignKey] = getModelAssigner(vnode);
|
|
10888
10901
|
},
|
|
10889
|
-
updated(el, { value,
|
|
10902
|
+
updated(el, { value, modifiers: { number } }) {
|
|
10890
10903
|
if (!el._assigning) {
|
|
10891
|
-
setSelected(el, value,
|
|
10904
|
+
setSelected(el, value, number);
|
|
10892
10905
|
}
|
|
10893
10906
|
}
|
|
10894
10907
|
};
|
|
10895
|
-
function setSelected(el, value,
|
|
10908
|
+
function setSelected(el, value, number) {
|
|
10896
10909
|
const isMultiple = el.multiple;
|
|
10897
10910
|
const isArrayValue = isArray(value);
|
|
10898
10911
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -10917,12 +10930,10 @@ function setSelected(el, value, oldValue, number) {
|
|
|
10917
10930
|
} else {
|
|
10918
10931
|
option.selected = value.has(optionValue);
|
|
10919
10932
|
}
|
|
10920
|
-
} else {
|
|
10921
|
-
if (
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
return;
|
|
10925
|
-
}
|
|
10933
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
10934
|
+
if (el.selectedIndex !== i)
|
|
10935
|
+
el.selectedIndex = i;
|
|
10936
|
+
return;
|
|
10926
10937
|
}
|
|
10927
10938
|
}
|
|
10928
10939
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -11863,11 +11874,10 @@ class Tokenizer {
|
|
|
11863
11874
|
} else if (this.inSFCRoot) {
|
|
11864
11875
|
this.state = 34;
|
|
11865
11876
|
} else if (!this.inXML) {
|
|
11866
|
-
|
|
11867
|
-
if (lower === 116) {
|
|
11877
|
+
if (c === 116) {
|
|
11868
11878
|
this.state = 30;
|
|
11869
11879
|
} else {
|
|
11870
|
-
this.state =
|
|
11880
|
+
this.state = c === 115 ? 29 : 6;
|
|
11871
11881
|
}
|
|
11872
11882
|
} else {
|
|
11873
11883
|
this.state = 6;
|
|
@@ -12139,10 +12149,9 @@ class Tokenizer {
|
|
|
12139
12149
|
}
|
|
12140
12150
|
}
|
|
12141
12151
|
stateBeforeSpecialS(c) {
|
|
12142
|
-
|
|
12143
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
12152
|
+
if (c === Sequences.ScriptEnd[3]) {
|
|
12144
12153
|
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
12145
|
-
} else if (
|
|
12154
|
+
} else if (c === Sequences.StyleEnd[3]) {
|
|
12146
12155
|
this.startSpecial(Sequences.StyleEnd, 4);
|
|
12147
12156
|
} else {
|
|
12148
12157
|
this.state = 6;
|
|
@@ -12150,10 +12159,9 @@ class Tokenizer {
|
|
|
12150
12159
|
}
|
|
12151
12160
|
}
|
|
12152
12161
|
stateBeforeSpecialT(c) {
|
|
12153
|
-
|
|
12154
|
-
if (lower === Sequences.TitleEnd[3]) {
|
|
12162
|
+
if (c === Sequences.TitleEnd[3]) {
|
|
12155
12163
|
this.startSpecial(Sequences.TitleEnd, 4);
|
|
12156
|
-
} else if (
|
|
12164
|
+
} else if (c === Sequences.TextareaEnd[3]) {
|
|
12157
12165
|
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
12158
12166
|
} else {
|
|
12159
12167
|
this.state = 6;
|