@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.global.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
|
**/
|
|
@@ -798,20 +798,20 @@ var Vue = (function () {
|
|
|
798
798
|
return obj.hasOwnProperty(key);
|
|
799
799
|
}
|
|
800
800
|
class BaseReactiveHandler {
|
|
801
|
-
constructor(_isReadonly = false,
|
|
801
|
+
constructor(_isReadonly = false, _isShallow = false) {
|
|
802
802
|
this._isReadonly = _isReadonly;
|
|
803
|
-
this.
|
|
803
|
+
this._isShallow = _isShallow;
|
|
804
804
|
}
|
|
805
805
|
get(target, key, receiver) {
|
|
806
|
-
const isReadonly2 = this._isReadonly,
|
|
806
|
+
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
807
807
|
if (key === "__v_isReactive") {
|
|
808
808
|
return !isReadonly2;
|
|
809
809
|
} else if (key === "__v_isReadonly") {
|
|
810
810
|
return isReadonly2;
|
|
811
811
|
} else if (key === "__v_isShallow") {
|
|
812
|
-
return
|
|
812
|
+
return isShallow2;
|
|
813
813
|
} else if (key === "__v_raw") {
|
|
814
|
-
if (receiver === (isReadonly2 ?
|
|
814
|
+
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
815
815
|
// this means the reciever is a user proxy of the reactive proxy
|
|
816
816
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
817
817
|
return target;
|
|
@@ -834,7 +834,7 @@ var Vue = (function () {
|
|
|
834
834
|
if (!isReadonly2) {
|
|
835
835
|
track(target, "get", key);
|
|
836
836
|
}
|
|
837
|
-
if (
|
|
837
|
+
if (isShallow2) {
|
|
838
838
|
return res;
|
|
839
839
|
}
|
|
840
840
|
if (isRef(res)) {
|
|
@@ -847,12 +847,12 @@ var Vue = (function () {
|
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
850
|
-
constructor(
|
|
851
|
-
super(false,
|
|
850
|
+
constructor(isShallow2 = false) {
|
|
851
|
+
super(false, isShallow2);
|
|
852
852
|
}
|
|
853
853
|
set(target, key, value, receiver) {
|
|
854
854
|
let oldValue = target[key];
|
|
855
|
-
if (!this.
|
|
855
|
+
if (!this._isShallow) {
|
|
856
856
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
857
857
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
858
858
|
oldValue = toRaw(oldValue);
|
|
@@ -904,8 +904,8 @@ var Vue = (function () {
|
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
907
|
-
constructor(
|
|
908
|
-
super(true,
|
|
907
|
+
constructor(isShallow2 = false) {
|
|
908
|
+
super(true, isShallow2);
|
|
909
909
|
}
|
|
910
910
|
set(target, key) {
|
|
911
911
|
{
|
|
@@ -1076,7 +1076,7 @@ var Vue = (function () {
|
|
|
1076
1076
|
return function(...args) {
|
|
1077
1077
|
{
|
|
1078
1078
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1079
|
-
|
|
1079
|
+
warn$2(
|
|
1080
1080
|
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1081
1081
|
toRaw(this)
|
|
1082
1082
|
);
|
|
@@ -1214,7 +1214,7 @@ var Vue = (function () {
|
|
|
1214
1214
|
const rawKey = toRaw(key);
|
|
1215
1215
|
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
1216
1216
|
const type = toRawType(target);
|
|
1217
|
-
|
|
1217
|
+
warn$2(
|
|
1218
1218
|
`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.`
|
|
1219
1219
|
);
|
|
1220
1220
|
}
|
|
@@ -1283,7 +1283,7 @@ var Vue = (function () {
|
|
|
1283
1283
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1284
1284
|
if (!isObject(target)) {
|
|
1285
1285
|
{
|
|
1286
|
-
|
|
1286
|
+
warn$2(`value cannot be made reactive: ${String(target)}`);
|
|
1287
1287
|
}
|
|
1288
1288
|
return target;
|
|
1289
1289
|
}
|
|
@@ -1336,6 +1336,7 @@ var Vue = (function () {
|
|
|
1336
1336
|
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`;
|
|
1337
1337
|
class ComputedRefImpl {
|
|
1338
1338
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1339
|
+
this.getter = getter;
|
|
1339
1340
|
this._setter = _setter;
|
|
1340
1341
|
this.dep = void 0;
|
|
1341
1342
|
this.__v_isRef = true;
|
|
@@ -1358,7 +1359,11 @@ var Vue = (function () {
|
|
|
1358
1359
|
}
|
|
1359
1360
|
trackRefValue(self);
|
|
1360
1361
|
if (self.effect._dirtyLevel >= 2) {
|
|
1361
|
-
|
|
1362
|
+
if (this._warnRecursive) {
|
|
1363
|
+
warn$2(COMPUTED_SIDE_EFFECT_WARN, `
|
|
1364
|
+
|
|
1365
|
+
getter: `, this.getter);
|
|
1366
|
+
}
|
|
1362
1367
|
triggerRefValue(self, 2);
|
|
1363
1368
|
}
|
|
1364
1369
|
return self._value;
|
|
@@ -1514,7 +1519,7 @@ var Vue = (function () {
|
|
|
1514
1519
|
}
|
|
1515
1520
|
function toRefs(object) {
|
|
1516
1521
|
if (!isProxy(object)) {
|
|
1517
|
-
|
|
1522
|
+
warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1518
1523
|
}
|
|
1519
1524
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1520
1525
|
for (const key in object) {
|
|
@@ -1596,7 +1601,10 @@ var Vue = (function () {
|
|
|
1596
1601
|
instance,
|
|
1597
1602
|
11,
|
|
1598
1603
|
[
|
|
1599
|
-
msg + args.
|
|
1604
|
+
msg + args.map((a) => {
|
|
1605
|
+
var _a, _b;
|
|
1606
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1607
|
+
}).join(""),
|
|
1600
1608
|
instance && instance.proxy,
|
|
1601
1609
|
trace.map(
|
|
1602
1610
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -3284,8 +3292,10 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3284
3292
|
rendererInternals
|
|
3285
3293
|
);
|
|
3286
3294
|
} else {
|
|
3287
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3295
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
3288
3296
|
n2.suspense = n1.suspense;
|
|
3297
|
+
n2.suspense.vnode = n2;
|
|
3298
|
+
n2.el = n1.el;
|
|
3289
3299
|
return;
|
|
3290
3300
|
}
|
|
3291
3301
|
patchSuspense(
|
|
@@ -4263,7 +4273,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4263
4273
|
setup(props, { slots }) {
|
|
4264
4274
|
const instance = getCurrentInstance();
|
|
4265
4275
|
const state = useTransitionState();
|
|
4266
|
-
let prevTransitionKey;
|
|
4267
4276
|
return () => {
|
|
4268
4277
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
4269
4278
|
if (!children || !children.length) {
|
|
@@ -4306,18 +4315,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4306
4315
|
setTransitionHooks(innerChild, enterHooks);
|
|
4307
4316
|
const oldChild = instance.subTree;
|
|
4308
4317
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
4309
|
-
|
|
4310
|
-
const { getTransitionKey } = innerChild.type;
|
|
4311
|
-
if (getTransitionKey) {
|
|
4312
|
-
const key = getTransitionKey();
|
|
4313
|
-
if (prevTransitionKey === void 0) {
|
|
4314
|
-
prevTransitionKey = key;
|
|
4315
|
-
} else if (key !== prevTransitionKey) {
|
|
4316
|
-
prevTransitionKey = key;
|
|
4317
|
-
transitionKeyChanged = true;
|
|
4318
|
-
}
|
|
4319
|
-
}
|
|
4320
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
4318
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
4321
4319
|
const leavingHooks = resolveTransitionHooks(
|
|
4322
4320
|
oldInnerChild,
|
|
4323
4321
|
rawProps,
|
|
@@ -6499,7 +6497,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6499
6497
|
return vm;
|
|
6500
6498
|
}
|
|
6501
6499
|
}
|
|
6502
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6500
|
+
Vue.version = `2.6.14-compat:${"3.4.21"}`;
|
|
6503
6501
|
Vue.config = singletonApp.config;
|
|
6504
6502
|
Vue.use = (p, ...options) => {
|
|
6505
6503
|
if (p && isFunction(p.install)) {
|
|
@@ -10747,9 +10745,8 @@ Component that was made reactive: `,
|
|
|
10747
10745
|
internalSetCurrentInstance(null);
|
|
10748
10746
|
};
|
|
10749
10747
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
10750
|
-
function validateComponentName(name,
|
|
10751
|
-
|
|
10752
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
10748
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
10749
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
10753
10750
|
warn$1(
|
|
10754
10751
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
10755
10752
|
);
|
|
@@ -11054,7 +11051,14 @@ Component that was made reactive: `,
|
|
|
11054
11051
|
}
|
|
11055
11052
|
|
|
11056
11053
|
const computed = (getterOrOptions, debugOptions) => {
|
|
11057
|
-
|
|
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;
|
|
11058
11062
|
};
|
|
11059
11063
|
|
|
11060
11064
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -11332,7 +11336,7 @@ Component that was made reactive: `,
|
|
|
11332
11336
|
return true;
|
|
11333
11337
|
}
|
|
11334
11338
|
|
|
11335
|
-
const version = "3.4.
|
|
11339
|
+
const version = "3.4.21";
|
|
11336
11340
|
const warn = warn$1 ;
|
|
11337
11341
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11338
11342
|
const devtools = devtools$1 ;
|
|
@@ -11737,10 +11741,11 @@ Component that was made reactive: `,
|
|
|
11737
11741
|
}
|
|
11738
11742
|
}
|
|
11739
11743
|
|
|
11740
|
-
const
|
|
11744
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
11745
|
+
const vShowHidden = Symbol("_vsh");
|
|
11741
11746
|
const vShow = {
|
|
11742
11747
|
beforeMount(el, { value }, { transition }) {
|
|
11743
|
-
el[
|
|
11748
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
11744
11749
|
if (transition && value) {
|
|
11745
11750
|
transition.beforeEnter(el);
|
|
11746
11751
|
} else {
|
|
@@ -11753,7 +11758,7 @@ Component that was made reactive: `,
|
|
|
11753
11758
|
}
|
|
11754
11759
|
},
|
|
11755
11760
|
updated(el, { value, oldValue }, { transition }) {
|
|
11756
|
-
if (!value === !oldValue
|
|
11761
|
+
if (!value === !oldValue)
|
|
11757
11762
|
return;
|
|
11758
11763
|
if (transition) {
|
|
11759
11764
|
if (value) {
|
|
@@ -11777,7 +11782,8 @@ Component that was made reactive: `,
|
|
|
11777
11782
|
vShow.name = "show";
|
|
11778
11783
|
}
|
|
11779
11784
|
function setDisplay(el, value) {
|
|
11780
|
-
el.style.display = value ? el[
|
|
11785
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
11786
|
+
el[vShowHidden] = !value;
|
|
11781
11787
|
}
|
|
11782
11788
|
|
|
11783
11789
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
@@ -11850,13 +11856,21 @@ Component that was made reactive: `,
|
|
|
11850
11856
|
function patchStyle(el, prev, next) {
|
|
11851
11857
|
const style = el.style;
|
|
11852
11858
|
const isCssString = isString(next);
|
|
11853
|
-
const currentDisplay = style.display;
|
|
11854
11859
|
let hasControlledDisplay = false;
|
|
11855
11860
|
if (next && !isCssString) {
|
|
11856
|
-
if (prev
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
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
|
+
}
|
|
11860
11874
|
}
|
|
11861
11875
|
}
|
|
11862
11876
|
}
|
|
@@ -11880,9 +11894,11 @@ Component that was made reactive: `,
|
|
|
11880
11894
|
el.removeAttribute("style");
|
|
11881
11895
|
}
|
|
11882
11896
|
}
|
|
11883
|
-
if (
|
|
11884
|
-
el[
|
|
11885
|
-
|
|
11897
|
+
if (vShowOriginalDisplay in el) {
|
|
11898
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11899
|
+
if (el[vShowHidden]) {
|
|
11900
|
+
style.display = "none";
|
|
11901
|
+
}
|
|
11886
11902
|
}
|
|
11887
11903
|
}
|
|
11888
11904
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -11993,15 +12009,15 @@ Component that was made reactive: `,
|
|
|
11993
12009
|
const tag = el.tagName;
|
|
11994
12010
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11995
12011
|
!tag.includes("-")) {
|
|
11996
|
-
el.
|
|
11997
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
12012
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
11998
12013
|
const newValue = value == null ? "" : value;
|
|
11999
|
-
if (oldValue !== newValue) {
|
|
12014
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
12000
12015
|
el.value = newValue;
|
|
12001
12016
|
}
|
|
12002
12017
|
if (value == null) {
|
|
12003
12018
|
el.removeAttribute(key);
|
|
12004
12019
|
}
|
|
12020
|
+
el._value = value;
|
|
12005
12021
|
return;
|
|
12006
12022
|
}
|
|
12007
12023
|
let needRemove = false;
|
|
@@ -12698,19 +12714,19 @@ Component that was made reactive: `,
|
|
|
12698
12714
|
},
|
|
12699
12715
|
// set value in mounted & updated because <select> relies on its children
|
|
12700
12716
|
// <option>s.
|
|
12701
|
-
mounted(el, { value,
|
|
12702
|
-
setSelected(el, value,
|
|
12717
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
12718
|
+
setSelected(el, value, number);
|
|
12703
12719
|
},
|
|
12704
12720
|
beforeUpdate(el, _binding, vnode) {
|
|
12705
12721
|
el[assignKey] = getModelAssigner(vnode);
|
|
12706
12722
|
},
|
|
12707
|
-
updated(el, { value,
|
|
12723
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12708
12724
|
if (!el._assigning) {
|
|
12709
|
-
setSelected(el, value,
|
|
12725
|
+
setSelected(el, value, number);
|
|
12710
12726
|
}
|
|
12711
12727
|
}
|
|
12712
12728
|
};
|
|
12713
|
-
function setSelected(el, value,
|
|
12729
|
+
function setSelected(el, value, number) {
|
|
12714
12730
|
const isMultiple = el.multiple;
|
|
12715
12731
|
const isArrayValue = isArray(value);
|
|
12716
12732
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -12735,12 +12751,10 @@ Component that was made reactive: `,
|
|
|
12735
12751
|
} else {
|
|
12736
12752
|
option.selected = value.has(optionValue);
|
|
12737
12753
|
}
|
|
12738
|
-
} else {
|
|
12739
|
-
if (
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
return;
|
|
12743
|
-
}
|
|
12754
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
12755
|
+
if (el.selectedIndex !== i)
|
|
12756
|
+
el.selectedIndex = i;
|
|
12757
|
+
return;
|
|
12744
12758
|
}
|
|
12745
12759
|
}
|
|
12746
12760
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -13749,11 +13763,10 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13749
13763
|
} else if (this.inSFCRoot) {
|
|
13750
13764
|
this.state = 34;
|
|
13751
13765
|
} else if (!this.inXML) {
|
|
13752
|
-
|
|
13753
|
-
if (lower === 116) {
|
|
13766
|
+
if (c === 116) {
|
|
13754
13767
|
this.state = 30;
|
|
13755
13768
|
} else {
|
|
13756
|
-
this.state =
|
|
13769
|
+
this.state = c === 115 ? 29 : 6;
|
|
13757
13770
|
}
|
|
13758
13771
|
} else {
|
|
13759
13772
|
this.state = 6;
|
|
@@ -14025,10 +14038,9 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
14025
14038
|
}
|
|
14026
14039
|
}
|
|
14027
14040
|
stateBeforeSpecialS(c) {
|
|
14028
|
-
|
|
14029
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
14041
|
+
if (c === Sequences.ScriptEnd[3]) {
|
|
14030
14042
|
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
14031
|
-
} else if (
|
|
14043
|
+
} else if (c === Sequences.StyleEnd[3]) {
|
|
14032
14044
|
this.startSpecial(Sequences.StyleEnd, 4);
|
|
14033
14045
|
} else {
|
|
14034
14046
|
this.state = 6;
|
|
@@ -14036,10 +14048,9 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
14036
14048
|
}
|
|
14037
14049
|
}
|
|
14038
14050
|
stateBeforeSpecialT(c) {
|
|
14039
|
-
|
|
14040
|
-
if (lower === Sequences.TitleEnd[3]) {
|
|
14051
|
+
if (c === Sequences.TitleEnd[3]) {
|
|
14041
14052
|
this.startSpecial(Sequences.TitleEnd, 4);
|
|
14042
|
-
} else if (
|
|
14053
|
+
} else if (c === Sequences.TextareaEnd[3]) {
|
|
14043
14054
|
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
14044
14055
|
} else {
|
|
14045
14056
|
this.state = 6;
|