vue 3.4.19 → 3.4.21
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 +83 -72
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +83 -72
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +77 -63
- 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 +77 -63
- 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.21
|
|
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) {
|
|
@@ -1593,7 +1598,10 @@ function warn$1(msg, ...args) {
|
|
|
1593
1598
|
instance,
|
|
1594
1599
|
11,
|
|
1595
1600
|
[
|
|
1596
|
-
msg + args.
|
|
1601
|
+
msg + args.map((a) => {
|
|
1602
|
+
var _a, _b;
|
|
1603
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1604
|
+
}).join(""),
|
|
1597
1605
|
instance && instance.proxy,
|
|
1598
1606
|
trace.map(
|
|
1599
1607
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -2760,8 +2768,10 @@ const SuspenseImpl = {
|
|
|
2760
2768
|
rendererInternals
|
|
2761
2769
|
);
|
|
2762
2770
|
} else {
|
|
2763
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2771
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
2764
2772
|
n2.suspense = n1.suspense;
|
|
2773
|
+
n2.suspense.vnode = n2;
|
|
2774
|
+
n2.el = n1.el;
|
|
2765
2775
|
return;
|
|
2766
2776
|
}
|
|
2767
2777
|
patchSuspense(
|
|
@@ -3694,7 +3704,6 @@ const BaseTransitionImpl = {
|
|
|
3694
3704
|
setup(props, { slots }) {
|
|
3695
3705
|
const instance = getCurrentInstance();
|
|
3696
3706
|
const state = useTransitionState();
|
|
3697
|
-
let prevTransitionKey;
|
|
3698
3707
|
return () => {
|
|
3699
3708
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3700
3709
|
if (!children || !children.length) {
|
|
@@ -3737,18 +3746,7 @@ const BaseTransitionImpl = {
|
|
|
3737
3746
|
setTransitionHooks(innerChild, enterHooks);
|
|
3738
3747
|
const oldChild = instance.subTree;
|
|
3739
3748
|
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)) {
|
|
3749
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
3752
3750
|
const leavingHooks = resolveTransitionHooks(
|
|
3753
3751
|
oldInnerChild,
|
|
3754
3752
|
rawProps,
|
|
@@ -9025,9 +9023,8 @@ const unsetCurrentInstance = () => {
|
|
|
9025
9023
|
internalSetCurrentInstance(null);
|
|
9026
9024
|
};
|
|
9027
9025
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
9028
|
-
function validateComponentName(name,
|
|
9029
|
-
|
|
9030
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
9026
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
9027
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
9031
9028
|
warn$1(
|
|
9032
9029
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
9033
9030
|
);
|
|
@@ -9320,7 +9317,14 @@ function isClassComponent(value) {
|
|
|
9320
9317
|
}
|
|
9321
9318
|
|
|
9322
9319
|
const computed = (getterOrOptions, debugOptions) => {
|
|
9323
|
-
|
|
9320
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9321
|
+
{
|
|
9322
|
+
const i = getCurrentInstance();
|
|
9323
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
9324
|
+
c._warnRecursive = true;
|
|
9325
|
+
}
|
|
9326
|
+
}
|
|
9327
|
+
return c;
|
|
9324
9328
|
};
|
|
9325
9329
|
|
|
9326
9330
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -9598,7 +9602,7 @@ function isMemoSame(cached, memo) {
|
|
|
9598
9602
|
return true;
|
|
9599
9603
|
}
|
|
9600
9604
|
|
|
9601
|
-
const version = "3.4.
|
|
9605
|
+
const version = "3.4.21";
|
|
9602
9606
|
const warn = warn$1 ;
|
|
9603
9607
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9604
9608
|
const devtools = devtools$1 ;
|
|
@@ -9959,10 +9963,11 @@ function patchClass(el, value, isSVG) {
|
|
|
9959
9963
|
}
|
|
9960
9964
|
}
|
|
9961
9965
|
|
|
9962
|
-
const
|
|
9966
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
9967
|
+
const vShowHidden = Symbol("_vsh");
|
|
9963
9968
|
const vShow = {
|
|
9964
9969
|
beforeMount(el, { value }, { transition }) {
|
|
9965
|
-
el[
|
|
9970
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
9966
9971
|
if (transition && value) {
|
|
9967
9972
|
transition.beforeEnter(el);
|
|
9968
9973
|
} else {
|
|
@@ -9975,7 +9980,7 @@ const vShow = {
|
|
|
9975
9980
|
}
|
|
9976
9981
|
},
|
|
9977
9982
|
updated(el, { value, oldValue }, { transition }) {
|
|
9978
|
-
if (!value === !oldValue
|
|
9983
|
+
if (!value === !oldValue)
|
|
9979
9984
|
return;
|
|
9980
9985
|
if (transition) {
|
|
9981
9986
|
if (value) {
|
|
@@ -9999,7 +10004,8 @@ const vShow = {
|
|
|
9999
10004
|
vShow.name = "show";
|
|
10000
10005
|
}
|
|
10001
10006
|
function setDisplay(el, value) {
|
|
10002
|
-
el.style.display = value ? el[
|
|
10007
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
10008
|
+
el[vShowHidden] = !value;
|
|
10003
10009
|
}
|
|
10004
10010
|
|
|
10005
10011
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
@@ -10072,13 +10078,21 @@ const displayRE = /(^|;)\s*display\s*:/;
|
|
|
10072
10078
|
function patchStyle(el, prev, next) {
|
|
10073
10079
|
const style = el.style;
|
|
10074
10080
|
const isCssString = isString(next);
|
|
10075
|
-
const currentDisplay = style.display;
|
|
10076
10081
|
let hasControlledDisplay = false;
|
|
10077
10082
|
if (next && !isCssString) {
|
|
10078
|
-
if (prev
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10083
|
+
if (prev) {
|
|
10084
|
+
if (!isString(prev)) {
|
|
10085
|
+
for (const key in prev) {
|
|
10086
|
+
if (next[key] == null) {
|
|
10087
|
+
setStyle(style, key, "");
|
|
10088
|
+
}
|
|
10089
|
+
}
|
|
10090
|
+
} else {
|
|
10091
|
+
for (const prevStyle of prev.split(";")) {
|
|
10092
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10093
|
+
if (next[key] == null) {
|
|
10094
|
+
setStyle(style, key, "");
|
|
10095
|
+
}
|
|
10082
10096
|
}
|
|
10083
10097
|
}
|
|
10084
10098
|
}
|
|
@@ -10102,9 +10116,11 @@ function patchStyle(el, prev, next) {
|
|
|
10102
10116
|
el.removeAttribute("style");
|
|
10103
10117
|
}
|
|
10104
10118
|
}
|
|
10105
|
-
if (
|
|
10106
|
-
el[
|
|
10107
|
-
|
|
10119
|
+
if (vShowOriginalDisplay in el) {
|
|
10120
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10121
|
+
if (el[vShowHidden]) {
|
|
10122
|
+
style.display = "none";
|
|
10123
|
+
}
|
|
10108
10124
|
}
|
|
10109
10125
|
}
|
|
10110
10126
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -10188,15 +10204,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
10188
10204
|
const tag = el.tagName;
|
|
10189
10205
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
10190
10206
|
!tag.includes("-")) {
|
|
10191
|
-
el.
|
|
10192
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
10207
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
10193
10208
|
const newValue = value == null ? "" : value;
|
|
10194
|
-
if (oldValue !== newValue) {
|
|
10209
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
10195
10210
|
el.value = newValue;
|
|
10196
10211
|
}
|
|
10197
10212
|
if (value == null) {
|
|
10198
10213
|
el.removeAttribute(key);
|
|
10199
10214
|
}
|
|
10215
|
+
el._value = value;
|
|
10200
10216
|
return;
|
|
10201
10217
|
}
|
|
10202
10218
|
let needRemove = false;
|
|
@@ -10880,19 +10896,19 @@ const vModelSelect = {
|
|
|
10880
10896
|
},
|
|
10881
10897
|
// set value in mounted & updated because <select> relies on its children
|
|
10882
10898
|
// <option>s.
|
|
10883
|
-
mounted(el, { value,
|
|
10884
|
-
setSelected(el, value,
|
|
10899
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
10900
|
+
setSelected(el, value, number);
|
|
10885
10901
|
},
|
|
10886
10902
|
beforeUpdate(el, _binding, vnode) {
|
|
10887
10903
|
el[assignKey] = getModelAssigner(vnode);
|
|
10888
10904
|
},
|
|
10889
|
-
updated(el, { value,
|
|
10905
|
+
updated(el, { value, modifiers: { number } }) {
|
|
10890
10906
|
if (!el._assigning) {
|
|
10891
|
-
setSelected(el, value,
|
|
10907
|
+
setSelected(el, value, number);
|
|
10892
10908
|
}
|
|
10893
10909
|
}
|
|
10894
10910
|
};
|
|
10895
|
-
function setSelected(el, value,
|
|
10911
|
+
function setSelected(el, value, number) {
|
|
10896
10912
|
const isMultiple = el.multiple;
|
|
10897
10913
|
const isArrayValue = isArray(value);
|
|
10898
10914
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -10917,12 +10933,10 @@ function setSelected(el, value, oldValue, number) {
|
|
|
10917
10933
|
} else {
|
|
10918
10934
|
option.selected = value.has(optionValue);
|
|
10919
10935
|
}
|
|
10920
|
-
} else {
|
|
10921
|
-
if (
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
return;
|
|
10925
|
-
}
|
|
10936
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
10937
|
+
if (el.selectedIndex !== i)
|
|
10938
|
+
el.selectedIndex = i;
|
|
10939
|
+
return;
|
|
10926
10940
|
}
|
|
10927
10941
|
}
|
|
10928
10942
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -11863,11 +11877,10 @@ class Tokenizer {
|
|
|
11863
11877
|
} else if (this.inSFCRoot) {
|
|
11864
11878
|
this.state = 34;
|
|
11865
11879
|
} else if (!this.inXML) {
|
|
11866
|
-
|
|
11867
|
-
if (lower === 116) {
|
|
11880
|
+
if (c === 116) {
|
|
11868
11881
|
this.state = 30;
|
|
11869
11882
|
} else {
|
|
11870
|
-
this.state =
|
|
11883
|
+
this.state = c === 115 ? 29 : 6;
|
|
11871
11884
|
}
|
|
11872
11885
|
} else {
|
|
11873
11886
|
this.state = 6;
|
|
@@ -12139,10 +12152,9 @@ class Tokenizer {
|
|
|
12139
12152
|
}
|
|
12140
12153
|
}
|
|
12141
12154
|
stateBeforeSpecialS(c) {
|
|
12142
|
-
|
|
12143
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
12155
|
+
if (c === Sequences.ScriptEnd[3]) {
|
|
12144
12156
|
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
12145
|
-
} else if (
|
|
12157
|
+
} else if (c === Sequences.StyleEnd[3]) {
|
|
12146
12158
|
this.startSpecial(Sequences.StyleEnd, 4);
|
|
12147
12159
|
} else {
|
|
12148
12160
|
this.state = 6;
|
|
@@ -12150,10 +12162,9 @@ class Tokenizer {
|
|
|
12150
12162
|
}
|
|
12151
12163
|
}
|
|
12152
12164
|
stateBeforeSpecialT(c) {
|
|
12153
|
-
|
|
12154
|
-
if (lower === Sequences.TitleEnd[3]) {
|
|
12165
|
+
if (c === Sequences.TitleEnd[3]) {
|
|
12155
12166
|
this.startSpecial(Sequences.TitleEnd, 4);
|
|
12156
|
-
} else if (
|
|
12167
|
+
} else if (c === Sequences.TextareaEnd[3]) {
|
|
12157
12168
|
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
12158
12169
|
} else {
|
|
12159
12170
|
this.state = 6;
|