@vue/compat 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 +84 -73
- package/dist/vue.cjs.prod.js +63 -64
- package/dist/vue.esm-browser.js +84 -73
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +84 -73
- package/dist/vue.global.js +84 -73
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +78 -64
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +78 -64
- package/dist/vue.runtime.global.js +78 -64
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +2 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -846,20 +846,20 @@ function hasOwnProperty(key) {
|
|
|
846
846
|
return obj.hasOwnProperty(key);
|
|
847
847
|
}
|
|
848
848
|
class BaseReactiveHandler {
|
|
849
|
-
constructor(_isReadonly = false,
|
|
849
|
+
constructor(_isReadonly = false, _isShallow = false) {
|
|
850
850
|
this._isReadonly = _isReadonly;
|
|
851
|
-
this.
|
|
851
|
+
this._isShallow = _isShallow;
|
|
852
852
|
}
|
|
853
853
|
get(target, key, receiver) {
|
|
854
|
-
const isReadonly2 = this._isReadonly,
|
|
854
|
+
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
855
855
|
if (key === "__v_isReactive") {
|
|
856
856
|
return !isReadonly2;
|
|
857
857
|
} else if (key === "__v_isReadonly") {
|
|
858
858
|
return isReadonly2;
|
|
859
859
|
} else if (key === "__v_isShallow") {
|
|
860
|
-
return
|
|
860
|
+
return isShallow2;
|
|
861
861
|
} else if (key === "__v_raw") {
|
|
862
|
-
if (receiver === (isReadonly2 ?
|
|
862
|
+
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
863
863
|
// this means the reciever is a user proxy of the reactive proxy
|
|
864
864
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
865
865
|
return target;
|
|
@@ -882,7 +882,7 @@ class BaseReactiveHandler {
|
|
|
882
882
|
if (!isReadonly2) {
|
|
883
883
|
track(target, "get", key);
|
|
884
884
|
}
|
|
885
|
-
if (
|
|
885
|
+
if (isShallow2) {
|
|
886
886
|
return res;
|
|
887
887
|
}
|
|
888
888
|
if (isRef(res)) {
|
|
@@ -895,12 +895,12 @@ class BaseReactiveHandler {
|
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
898
|
-
constructor(
|
|
899
|
-
super(false,
|
|
898
|
+
constructor(isShallow2 = false) {
|
|
899
|
+
super(false, isShallow2);
|
|
900
900
|
}
|
|
901
901
|
set(target, key, value, receiver) {
|
|
902
902
|
let oldValue = target[key];
|
|
903
|
-
if (!this.
|
|
903
|
+
if (!this._isShallow) {
|
|
904
904
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
905
905
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
906
906
|
oldValue = toRaw(oldValue);
|
|
@@ -952,8 +952,8 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
954
|
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
955
|
-
constructor(
|
|
956
|
-
super(true,
|
|
955
|
+
constructor(isShallow2 = false) {
|
|
956
|
+
super(true, isShallow2);
|
|
957
957
|
}
|
|
958
958
|
set(target, key) {
|
|
959
959
|
{
|
|
@@ -1124,7 +1124,7 @@ function createReadonlyMethod(type) {
|
|
|
1124
1124
|
return function(...args) {
|
|
1125
1125
|
{
|
|
1126
1126
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1127
|
-
|
|
1127
|
+
warn$2(
|
|
1128
1128
|
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1129
1129
|
toRaw(this)
|
|
1130
1130
|
);
|
|
@@ -1262,7 +1262,7 @@ function checkIdentityKeys(target, has2, key) {
|
|
|
1262
1262
|
const rawKey = toRaw(key);
|
|
1263
1263
|
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
1264
1264
|
const type = toRawType(target);
|
|
1265
|
-
|
|
1265
|
+
warn$2(
|
|
1266
1266
|
`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.`
|
|
1267
1267
|
);
|
|
1268
1268
|
}
|
|
@@ -1331,7 +1331,7 @@ function shallowReadonly(target) {
|
|
|
1331
1331
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1332
1332
|
if (!isObject(target)) {
|
|
1333
1333
|
{
|
|
1334
|
-
|
|
1334
|
+
warn$2(`value cannot be made reactive: ${String(target)}`);
|
|
1335
1335
|
}
|
|
1336
1336
|
return target;
|
|
1337
1337
|
}
|
|
@@ -1384,6 +1384,7 @@ const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
|
1384
1384
|
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`;
|
|
1385
1385
|
class ComputedRefImpl {
|
|
1386
1386
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1387
|
+
this.getter = getter;
|
|
1387
1388
|
this._setter = _setter;
|
|
1388
1389
|
this.dep = void 0;
|
|
1389
1390
|
this.__v_isRef = true;
|
|
@@ -1406,7 +1407,11 @@ class ComputedRefImpl {
|
|
|
1406
1407
|
}
|
|
1407
1408
|
trackRefValue(self);
|
|
1408
1409
|
if (self.effect._dirtyLevel >= 2) {
|
|
1409
|
-
|
|
1410
|
+
if (this._warnRecursive) {
|
|
1411
|
+
warn$2(COMPUTED_SIDE_EFFECT_WARN, `
|
|
1412
|
+
|
|
1413
|
+
getter: `, this.getter);
|
|
1414
|
+
}
|
|
1410
1415
|
triggerRefValue(self, 2);
|
|
1411
1416
|
}
|
|
1412
1417
|
return self._value;
|
|
@@ -1562,7 +1567,7 @@ function customRef(factory) {
|
|
|
1562
1567
|
}
|
|
1563
1568
|
function toRefs(object) {
|
|
1564
1569
|
if (!isProxy(object)) {
|
|
1565
|
-
|
|
1570
|
+
warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1566
1571
|
}
|
|
1567
1572
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1568
1573
|
for (const key in object) {
|
|
@@ -1644,7 +1649,10 @@ function warn$1(msg, ...args) {
|
|
|
1644
1649
|
instance,
|
|
1645
1650
|
11,
|
|
1646
1651
|
[
|
|
1647
|
-
msg + args.
|
|
1652
|
+
msg + args.map((a) => {
|
|
1653
|
+
var _a, _b;
|
|
1654
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1655
|
+
}).join(""),
|
|
1648
1656
|
instance && instance.proxy,
|
|
1649
1657
|
trace.map(
|
|
1650
1658
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -3332,8 +3340,10 @@ const SuspenseImpl = {
|
|
|
3332
3340
|
rendererInternals
|
|
3333
3341
|
);
|
|
3334
3342
|
} else {
|
|
3335
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3343
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
3336
3344
|
n2.suspense = n1.suspense;
|
|
3345
|
+
n2.suspense.vnode = n2;
|
|
3346
|
+
n2.el = n1.el;
|
|
3337
3347
|
return;
|
|
3338
3348
|
}
|
|
3339
3349
|
patchSuspense(
|
|
@@ -4338,7 +4348,6 @@ const BaseTransitionImpl = {
|
|
|
4338
4348
|
setup(props, { slots }) {
|
|
4339
4349
|
const instance = getCurrentInstance();
|
|
4340
4350
|
const state = useTransitionState();
|
|
4341
|
-
let prevTransitionKey;
|
|
4342
4351
|
return () => {
|
|
4343
4352
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
4344
4353
|
if (!children || !children.length) {
|
|
@@ -4381,18 +4390,7 @@ const BaseTransitionImpl = {
|
|
|
4381
4390
|
setTransitionHooks(innerChild, enterHooks);
|
|
4382
4391
|
const oldChild = instance.subTree;
|
|
4383
4392
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
4384
|
-
|
|
4385
|
-
const { getTransitionKey } = innerChild.type;
|
|
4386
|
-
if (getTransitionKey) {
|
|
4387
|
-
const key = getTransitionKey();
|
|
4388
|
-
if (prevTransitionKey === void 0) {
|
|
4389
|
-
prevTransitionKey = key;
|
|
4390
|
-
} else if (key !== prevTransitionKey) {
|
|
4391
|
-
prevTransitionKey = key;
|
|
4392
|
-
transitionKeyChanged = true;
|
|
4393
|
-
}
|
|
4394
|
-
}
|
|
4395
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
4393
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
4396
4394
|
const leavingHooks = resolveTransitionHooks(
|
|
4397
4395
|
oldInnerChild,
|
|
4398
4396
|
rawProps,
|
|
@@ -6580,7 +6578,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6580
6578
|
return vm;
|
|
6581
6579
|
}
|
|
6582
6580
|
}
|
|
6583
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6581
|
+
Vue.version = `2.6.14-compat:${"3.4.21"}`;
|
|
6584
6582
|
Vue.config = singletonApp.config;
|
|
6585
6583
|
Vue.use = (p, ...options) => {
|
|
6586
6584
|
if (p && isFunction(p.install)) {
|
|
@@ -10843,9 +10841,8 @@ const unsetCurrentInstance = () => {
|
|
|
10843
10841
|
internalSetCurrentInstance(null);
|
|
10844
10842
|
};
|
|
10845
10843
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
10846
|
-
function validateComponentName(name,
|
|
10847
|
-
|
|
10848
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
10844
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
10845
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
10849
10846
|
warn$1(
|
|
10850
10847
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
10851
10848
|
);
|
|
@@ -11152,7 +11149,14 @@ function isClassComponent(value) {
|
|
|
11152
11149
|
}
|
|
11153
11150
|
|
|
11154
11151
|
const computed = (getterOrOptions, debugOptions) => {
|
|
11155
|
-
|
|
11152
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
11153
|
+
{
|
|
11154
|
+
const i = getCurrentInstance();
|
|
11155
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
11156
|
+
c._warnRecursive = true;
|
|
11157
|
+
}
|
|
11158
|
+
}
|
|
11159
|
+
return c;
|
|
11156
11160
|
};
|
|
11157
11161
|
|
|
11158
11162
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -11430,7 +11434,7 @@ function isMemoSame(cached, memo) {
|
|
|
11430
11434
|
return true;
|
|
11431
11435
|
}
|
|
11432
11436
|
|
|
11433
|
-
const version = "3.4.
|
|
11437
|
+
const version = "3.4.21";
|
|
11434
11438
|
const warn = warn$1 ;
|
|
11435
11439
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11436
11440
|
const devtools = devtools$1 ;
|
|
@@ -11843,10 +11847,11 @@ function patchClass(el, value, isSVG) {
|
|
|
11843
11847
|
}
|
|
11844
11848
|
}
|
|
11845
11849
|
|
|
11846
|
-
const
|
|
11850
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
11851
|
+
const vShowHidden = Symbol("_vsh");
|
|
11847
11852
|
const vShow = {
|
|
11848
11853
|
beforeMount(el, { value }, { transition }) {
|
|
11849
|
-
el[
|
|
11854
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
11850
11855
|
if (transition && value) {
|
|
11851
11856
|
transition.beforeEnter(el);
|
|
11852
11857
|
} else {
|
|
@@ -11859,7 +11864,7 @@ const vShow = {
|
|
|
11859
11864
|
}
|
|
11860
11865
|
},
|
|
11861
11866
|
updated(el, { value, oldValue }, { transition }) {
|
|
11862
|
-
if (!value === !oldValue
|
|
11867
|
+
if (!value === !oldValue)
|
|
11863
11868
|
return;
|
|
11864
11869
|
if (transition) {
|
|
11865
11870
|
if (value) {
|
|
@@ -11883,7 +11888,8 @@ const vShow = {
|
|
|
11883
11888
|
vShow.name = "show";
|
|
11884
11889
|
}
|
|
11885
11890
|
function setDisplay(el, value) {
|
|
11886
|
-
el.style.display = value ? el[
|
|
11891
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
11892
|
+
el[vShowHidden] = !value;
|
|
11887
11893
|
}
|
|
11888
11894
|
function initVShowForSSR() {
|
|
11889
11895
|
vShow.getSSRProps = ({ value }) => {
|
|
@@ -11902,13 +11908,21 @@ const displayRE = /(^|;)\s*display\s*:/;
|
|
|
11902
11908
|
function patchStyle(el, prev, next) {
|
|
11903
11909
|
const style = el.style;
|
|
11904
11910
|
const isCssString = isString(next);
|
|
11905
|
-
const currentDisplay = style.display;
|
|
11906
11911
|
let hasControlledDisplay = false;
|
|
11907
11912
|
if (next && !isCssString) {
|
|
11908
|
-
if (prev
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11913
|
+
if (prev) {
|
|
11914
|
+
if (!isString(prev)) {
|
|
11915
|
+
for (const key in prev) {
|
|
11916
|
+
if (next[key] == null) {
|
|
11917
|
+
setStyle(style, key, "");
|
|
11918
|
+
}
|
|
11919
|
+
}
|
|
11920
|
+
} else {
|
|
11921
|
+
for (const prevStyle of prev.split(";")) {
|
|
11922
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
11923
|
+
if (next[key] == null) {
|
|
11924
|
+
setStyle(style, key, "");
|
|
11925
|
+
}
|
|
11912
11926
|
}
|
|
11913
11927
|
}
|
|
11914
11928
|
}
|
|
@@ -11932,9 +11946,11 @@ function patchStyle(el, prev, next) {
|
|
|
11932
11946
|
el.removeAttribute("style");
|
|
11933
11947
|
}
|
|
11934
11948
|
}
|
|
11935
|
-
if (
|
|
11936
|
-
el[
|
|
11937
|
-
|
|
11949
|
+
if (vShowOriginalDisplay in el) {
|
|
11950
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11951
|
+
if (el[vShowHidden]) {
|
|
11952
|
+
style.display = "none";
|
|
11953
|
+
}
|
|
11938
11954
|
}
|
|
11939
11955
|
}
|
|
11940
11956
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -12045,15 +12061,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
12045
12061
|
const tag = el.tagName;
|
|
12046
12062
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
12047
12063
|
!tag.includes("-")) {
|
|
12048
|
-
el.
|
|
12049
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
12064
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
12050
12065
|
const newValue = value == null ? "" : value;
|
|
12051
|
-
if (oldValue !== newValue) {
|
|
12066
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
12052
12067
|
el.value = newValue;
|
|
12053
12068
|
}
|
|
12054
12069
|
if (value == null) {
|
|
12055
12070
|
el.removeAttribute(key);
|
|
12056
12071
|
}
|
|
12072
|
+
el._value = value;
|
|
12057
12073
|
return;
|
|
12058
12074
|
}
|
|
12059
12075
|
let needRemove = false;
|
|
@@ -12762,19 +12778,19 @@ const vModelSelect = {
|
|
|
12762
12778
|
},
|
|
12763
12779
|
// set value in mounted & updated because <select> relies on its children
|
|
12764
12780
|
// <option>s.
|
|
12765
|
-
mounted(el, { value,
|
|
12766
|
-
setSelected(el, value,
|
|
12781
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
12782
|
+
setSelected(el, value, number);
|
|
12767
12783
|
},
|
|
12768
12784
|
beforeUpdate(el, _binding, vnode) {
|
|
12769
12785
|
el[assignKey] = getModelAssigner(vnode);
|
|
12770
12786
|
},
|
|
12771
|
-
updated(el, { value,
|
|
12787
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12772
12788
|
if (!el._assigning) {
|
|
12773
|
-
setSelected(el, value,
|
|
12789
|
+
setSelected(el, value, number);
|
|
12774
12790
|
}
|
|
12775
12791
|
}
|
|
12776
12792
|
};
|
|
12777
|
-
function setSelected(el, value,
|
|
12793
|
+
function setSelected(el, value, number) {
|
|
12778
12794
|
const isMultiple = el.multiple;
|
|
12779
12795
|
const isArrayValue = isArray(value);
|
|
12780
12796
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -12799,12 +12815,10 @@ function setSelected(el, value, oldValue, number) {
|
|
|
12799
12815
|
} else {
|
|
12800
12816
|
option.selected = value.has(optionValue);
|
|
12801
12817
|
}
|
|
12802
|
-
} else {
|
|
12803
|
-
if (
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
return;
|
|
12807
|
-
}
|
|
12818
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
12819
|
+
if (el.selectedIndex !== i)
|
|
12820
|
+
el.selectedIndex = i;
|
|
12821
|
+
return;
|
|
12808
12822
|
}
|
|
12809
12823
|
}
|
|
12810
12824
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -13849,11 +13863,10 @@ class Tokenizer {
|
|
|
13849
13863
|
} else if (this.inSFCRoot) {
|
|
13850
13864
|
this.state = 34;
|
|
13851
13865
|
} else if (!this.inXML) {
|
|
13852
|
-
|
|
13853
|
-
if (lower === 116) {
|
|
13866
|
+
if (c === 116) {
|
|
13854
13867
|
this.state = 30;
|
|
13855
13868
|
} else {
|
|
13856
|
-
this.state =
|
|
13869
|
+
this.state = c === 115 ? 29 : 6;
|
|
13857
13870
|
}
|
|
13858
13871
|
} else {
|
|
13859
13872
|
this.state = 6;
|
|
@@ -14129,10 +14142,9 @@ class Tokenizer {
|
|
|
14129
14142
|
}
|
|
14130
14143
|
}
|
|
14131
14144
|
stateBeforeSpecialS(c) {
|
|
14132
|
-
|
|
14133
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
14145
|
+
if (c === Sequences.ScriptEnd[3]) {
|
|
14134
14146
|
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
14135
|
-
} else if (
|
|
14147
|
+
} else if (c === Sequences.StyleEnd[3]) {
|
|
14136
14148
|
this.startSpecial(Sequences.StyleEnd, 4);
|
|
14137
14149
|
} else {
|
|
14138
14150
|
this.state = 6;
|
|
@@ -14140,10 +14152,9 @@ class Tokenizer {
|
|
|
14140
14152
|
}
|
|
14141
14153
|
}
|
|
14142
14154
|
stateBeforeSpecialT(c) {
|
|
14143
|
-
|
|
14144
|
-
if (lower === Sequences.TitleEnd[3]) {
|
|
14155
|
+
if (c === Sequences.TitleEnd[3]) {
|
|
14145
14156
|
this.startSpecial(Sequences.TitleEnd, 4);
|
|
14146
|
-
} else if (
|
|
14157
|
+
} else if (c === Sequences.TextareaEnd[3]) {
|
|
14147
14158
|
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
14148
14159
|
} else {
|
|
14149
14160
|
this.state = 6;
|