@vue/compat 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 +77 -69
- package/dist/vue.cjs.prod.js +60 -61
- package/dist/vue.esm-browser.js +77 -69
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +77 -69
- package/dist/vue.global.js +77 -69
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +71 -60
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +71 -60
- package/dist/vue.runtime.global.js +71 -60
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat 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) {
|
|
@@ -3283,6 +3288,8 @@ const SuspenseImpl = {
|
|
|
3283
3288
|
} else {
|
|
3284
3289
|
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3285
3290
|
n2.suspense = n1.suspense;
|
|
3291
|
+
n2.suspense.vnode = n2;
|
|
3292
|
+
n2.el = n1.el;
|
|
3286
3293
|
return;
|
|
3287
3294
|
}
|
|
3288
3295
|
patchSuspense(
|
|
@@ -4266,7 +4273,6 @@ const BaseTransitionImpl = {
|
|
|
4266
4273
|
setup(props, { slots }) {
|
|
4267
4274
|
const instance = getCurrentInstance();
|
|
4268
4275
|
const state = useTransitionState();
|
|
4269
|
-
let prevTransitionKey;
|
|
4270
4276
|
return () => {
|
|
4271
4277
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
4272
4278
|
if (!children || !children.length) {
|
|
@@ -4309,18 +4315,7 @@ const BaseTransitionImpl = {
|
|
|
4309
4315
|
setTransitionHooks(innerChild, enterHooks);
|
|
4310
4316
|
const oldChild = instance.subTree;
|
|
4311
4317
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
4312
|
-
|
|
4313
|
-
const { getTransitionKey } = innerChild.type;
|
|
4314
|
-
if (getTransitionKey) {
|
|
4315
|
-
const key = getTransitionKey();
|
|
4316
|
-
if (prevTransitionKey === void 0) {
|
|
4317
|
-
prevTransitionKey = key;
|
|
4318
|
-
} else if (key !== prevTransitionKey) {
|
|
4319
|
-
prevTransitionKey = key;
|
|
4320
|
-
transitionKeyChanged = true;
|
|
4321
|
-
}
|
|
4322
|
-
}
|
|
4323
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
4318
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
4324
4319
|
const leavingHooks = resolveTransitionHooks(
|
|
4325
4320
|
oldInnerChild,
|
|
4326
4321
|
rawProps,
|
|
@@ -6502,7 +6497,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6502
6497
|
return vm;
|
|
6503
6498
|
}
|
|
6504
6499
|
}
|
|
6505
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6500
|
+
Vue.version = `2.6.14-compat:${"3.4.20"}`;
|
|
6506
6501
|
Vue.config = singletonApp.config;
|
|
6507
6502
|
Vue.use = (p, ...options) => {
|
|
6508
6503
|
if (p && isFunction(p.install)) {
|
|
@@ -10750,9 +10745,8 @@ const unsetCurrentInstance = () => {
|
|
|
10750
10745
|
internalSetCurrentInstance(null);
|
|
10751
10746
|
};
|
|
10752
10747
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
10753
|
-
function validateComponentName(name,
|
|
10754
|
-
|
|
10755
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
10748
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
10749
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
10756
10750
|
warn$1(
|
|
10757
10751
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
10758
10752
|
);
|
|
@@ -11057,7 +11051,14 @@ function isClassComponent(value) {
|
|
|
11057
11051
|
}
|
|
11058
11052
|
|
|
11059
11053
|
const computed = (getterOrOptions, debugOptions) => {
|
|
11060
|
-
|
|
11054
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
11055
|
+
{
|
|
11056
|
+
const i = getCurrentInstance();
|
|
11057
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
11058
|
+
c._warnRecursive = true;
|
|
11059
|
+
}
|
|
11060
|
+
}
|
|
11061
|
+
return c;
|
|
11061
11062
|
};
|
|
11062
11063
|
|
|
11063
11064
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -11335,7 +11336,7 @@ function isMemoSame(cached, memo) {
|
|
|
11335
11336
|
return true;
|
|
11336
11337
|
}
|
|
11337
11338
|
|
|
11338
|
-
const version = "3.4.
|
|
11339
|
+
const version = "3.4.20";
|
|
11339
11340
|
const warn = warn$1 ;
|
|
11340
11341
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11341
11342
|
const devtools = devtools$1 ;
|
|
@@ -11740,10 +11741,11 @@ function patchClass(el, value, isSVG) {
|
|
|
11740
11741
|
}
|
|
11741
11742
|
}
|
|
11742
11743
|
|
|
11743
|
-
const
|
|
11744
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
11745
|
+
const vShowHidden = Symbol("_vsh");
|
|
11744
11746
|
const vShow = {
|
|
11745
11747
|
beforeMount(el, { value }, { transition }) {
|
|
11746
|
-
el[
|
|
11748
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
11747
11749
|
if (transition && value) {
|
|
11748
11750
|
transition.beforeEnter(el);
|
|
11749
11751
|
} else {
|
|
@@ -11756,7 +11758,7 @@ const vShow = {
|
|
|
11756
11758
|
}
|
|
11757
11759
|
},
|
|
11758
11760
|
updated(el, { value, oldValue }, { transition }) {
|
|
11759
|
-
if (!value === !oldValue
|
|
11761
|
+
if (!value === !oldValue)
|
|
11760
11762
|
return;
|
|
11761
11763
|
if (transition) {
|
|
11762
11764
|
if (value) {
|
|
@@ -11780,7 +11782,8 @@ const vShow = {
|
|
|
11780
11782
|
vShow.name = "show";
|
|
11781
11783
|
}
|
|
11782
11784
|
function setDisplay(el, value) {
|
|
11783
|
-
el.style.display = value ? el[
|
|
11785
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
11786
|
+
el[vShowHidden] = !value;
|
|
11784
11787
|
}
|
|
11785
11788
|
|
|
11786
11789
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
@@ -11853,13 +11856,21 @@ const displayRE = /(^|;)\s*display\s*:/;
|
|
|
11853
11856
|
function patchStyle(el, prev, next) {
|
|
11854
11857
|
const style = el.style;
|
|
11855
11858
|
const isCssString = isString(next);
|
|
11856
|
-
const currentDisplay = style.display;
|
|
11857
11859
|
let hasControlledDisplay = false;
|
|
11858
11860
|
if (next && !isCssString) {
|
|
11859
|
-
if (prev
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11861
|
+
if (prev) {
|
|
11862
|
+
if (!isString(prev)) {
|
|
11863
|
+
for (const key in prev) {
|
|
11864
|
+
if (next[key] == null) {
|
|
11865
|
+
setStyle(style, key, "");
|
|
11866
|
+
}
|
|
11867
|
+
}
|
|
11868
|
+
} else {
|
|
11869
|
+
for (const prevStyle of prev.split(";")) {
|
|
11870
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
11871
|
+
if (next[key] == null) {
|
|
11872
|
+
setStyle(style, key, "");
|
|
11873
|
+
}
|
|
11863
11874
|
}
|
|
11864
11875
|
}
|
|
11865
11876
|
}
|
|
@@ -11883,9 +11894,11 @@ function patchStyle(el, prev, next) {
|
|
|
11883
11894
|
el.removeAttribute("style");
|
|
11884
11895
|
}
|
|
11885
11896
|
}
|
|
11886
|
-
if (
|
|
11887
|
-
el[
|
|
11888
|
-
|
|
11897
|
+
if (vShowOriginalDisplay in el) {
|
|
11898
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11899
|
+
if (el[vShowHidden]) {
|
|
11900
|
+
style.display = "none";
|
|
11901
|
+
}
|
|
11889
11902
|
}
|
|
11890
11903
|
}
|
|
11891
11904
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -11997,7 +12010,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
11997
12010
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11998
12011
|
!tag.includes("-")) {
|
|
11999
12012
|
el._value = value;
|
|
12000
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
12013
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
12001
12014
|
const newValue = value == null ? "" : value;
|
|
12002
12015
|
if (oldValue !== newValue) {
|
|
12003
12016
|
el.value = newValue;
|
|
@@ -12713,19 +12726,19 @@ const vModelSelect = {
|
|
|
12713
12726
|
},
|
|
12714
12727
|
// set value in mounted & updated because <select> relies on its children
|
|
12715
12728
|
// <option>s.
|
|
12716
|
-
mounted(el, { value,
|
|
12717
|
-
setSelected(el, value,
|
|
12729
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
12730
|
+
setSelected(el, value, number);
|
|
12718
12731
|
},
|
|
12719
12732
|
beforeUpdate(el, _binding, vnode) {
|
|
12720
12733
|
el[assignKey] = getModelAssigner(vnode);
|
|
12721
12734
|
},
|
|
12722
|
-
updated(el, { value,
|
|
12735
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12723
12736
|
if (!el._assigning) {
|
|
12724
|
-
setSelected(el, value,
|
|
12737
|
+
setSelected(el, value, number);
|
|
12725
12738
|
}
|
|
12726
12739
|
}
|
|
12727
12740
|
};
|
|
12728
|
-
function setSelected(el, value,
|
|
12741
|
+
function setSelected(el, value, number) {
|
|
12729
12742
|
const isMultiple = el.multiple;
|
|
12730
12743
|
const isArrayValue = isArray(value);
|
|
12731
12744
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -12750,12 +12763,10 @@ function setSelected(el, value, oldValue, number) {
|
|
|
12750
12763
|
} else {
|
|
12751
12764
|
option.selected = value.has(optionValue);
|
|
12752
12765
|
}
|
|
12753
|
-
} else {
|
|
12754
|
-
if (
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
return;
|
|
12758
|
-
}
|
|
12766
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
12767
|
+
if (el.selectedIndex !== i)
|
|
12768
|
+
el.selectedIndex = i;
|
|
12769
|
+
return;
|
|
12759
12770
|
}
|
|
12760
12771
|
}
|
|
12761
12772
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -13764,11 +13775,10 @@ class Tokenizer {
|
|
|
13764
13775
|
} else if (this.inSFCRoot) {
|
|
13765
13776
|
this.state = 34;
|
|
13766
13777
|
} else if (!this.inXML) {
|
|
13767
|
-
|
|
13768
|
-
if (lower === 116) {
|
|
13778
|
+
if (c === 116) {
|
|
13769
13779
|
this.state = 30;
|
|
13770
13780
|
} else {
|
|
13771
|
-
this.state =
|
|
13781
|
+
this.state = c === 115 ? 29 : 6;
|
|
13772
13782
|
}
|
|
13773
13783
|
} else {
|
|
13774
13784
|
this.state = 6;
|
|
@@ -14040,10 +14050,9 @@ class Tokenizer {
|
|
|
14040
14050
|
}
|
|
14041
14051
|
}
|
|
14042
14052
|
stateBeforeSpecialS(c) {
|
|
14043
|
-
|
|
14044
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
14053
|
+
if (c === Sequences.ScriptEnd[3]) {
|
|
14045
14054
|
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
14046
|
-
} else if (
|
|
14055
|
+
} else if (c === Sequences.StyleEnd[3]) {
|
|
14047
14056
|
this.startSpecial(Sequences.StyleEnd, 4);
|
|
14048
14057
|
} else {
|
|
14049
14058
|
this.state = 6;
|
|
@@ -14051,10 +14060,9 @@ class Tokenizer {
|
|
|
14051
14060
|
}
|
|
14052
14061
|
}
|
|
14053
14062
|
stateBeforeSpecialT(c) {
|
|
14054
|
-
|
|
14055
|
-
if (lower === Sequences.TitleEnd[3]) {
|
|
14063
|
+
if (c === Sequences.TitleEnd[3]) {
|
|
14056
14064
|
this.startSpecial(Sequences.TitleEnd, 4);
|
|
14057
|
-
} else if (
|
|
14065
|
+
} else if (c === Sequences.TextareaEnd[3]) {
|
|
14058
14066
|
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
14059
14067
|
} else {
|
|
14060
14068
|
this.state = 6;
|