@vue/compat 3.4.20 → 3.4.22
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 +212 -128
- package/dist/vue.cjs.prod.js +175 -119
- package/dist/vue.esm-browser.js +210 -128
- package/dist/vue.esm-browser.prod.js +6 -5
- package/dist/vue.esm-bundler.js +218 -138
- package/dist/vue.global.js +210 -128
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +187 -125
- package/dist/vue.runtime.esm-browser.prod.js +6 -5
- package/dist/vue.runtime.esm-bundler.js +195 -135
- package/dist/vue.runtime.global.js +187 -125
- package/dist/vue.runtime.global.prod.js +7 -6
- package/package.json +4 -4
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
var Vue = (function () {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
10
|
+
// @__NO_SIDE_EFFECTS__
|
|
9
11
|
function makeMap(str, expectsLowerCase) {
|
|
10
12
|
const set = new Set(str.split(","));
|
|
11
13
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -292,7 +294,11 @@ var Vue = (function () {
|
|
|
292
294
|
};
|
|
293
295
|
const stringifySymbol = (v, i = "") => {
|
|
294
296
|
var _a;
|
|
295
|
-
return
|
|
297
|
+
return (
|
|
298
|
+
// Symbol.description in es2019+ so we need to cast here to pass
|
|
299
|
+
// the lib: es2016 check
|
|
300
|
+
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
301
|
+
);
|
|
296
302
|
};
|
|
297
303
|
|
|
298
304
|
function warn$2(msg, ...args) {
|
|
@@ -728,6 +734,8 @@ var Vue = (function () {
|
|
|
728
734
|
return instrumentations;
|
|
729
735
|
}
|
|
730
736
|
function hasOwnProperty(key) {
|
|
737
|
+
if (!isSymbol(key))
|
|
738
|
+
key = String(key);
|
|
731
739
|
const obj = toRaw(this);
|
|
732
740
|
track(obj, "has", key);
|
|
733
741
|
return obj.hasOwnProperty(key);
|
|
@@ -1080,23 +1088,16 @@ var Vue = (function () {
|
|
|
1080
1088
|
clear: createReadonlyMethod("clear"),
|
|
1081
1089
|
forEach: createForEach(true, true)
|
|
1082
1090
|
};
|
|
1083
|
-
const iteratorMethods = [
|
|
1091
|
+
const iteratorMethods = [
|
|
1092
|
+
"keys",
|
|
1093
|
+
"values",
|
|
1094
|
+
"entries",
|
|
1095
|
+
Symbol.iterator
|
|
1096
|
+
];
|
|
1084
1097
|
iteratorMethods.forEach((method) => {
|
|
1085
|
-
mutableInstrumentations2[method] = createIterableMethod(
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
false
|
|
1089
|
-
);
|
|
1090
|
-
readonlyInstrumentations2[method] = createIterableMethod(
|
|
1091
|
-
method,
|
|
1092
|
-
true,
|
|
1093
|
-
false
|
|
1094
|
-
);
|
|
1095
|
-
shallowInstrumentations2[method] = createIterableMethod(
|
|
1096
|
-
method,
|
|
1097
|
-
false,
|
|
1098
|
-
true
|
|
1099
|
-
);
|
|
1098
|
+
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
1099
|
+
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1100
|
+
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1100
1101
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1101
1102
|
method,
|
|
1102
1103
|
true,
|
|
@@ -1253,7 +1254,7 @@ var Vue = (function () {
|
|
|
1253
1254
|
return !!(value && value["__v_isShallow"]);
|
|
1254
1255
|
}
|
|
1255
1256
|
function isProxy(value) {
|
|
1256
|
-
return
|
|
1257
|
+
return value ? !!value["__v_raw"] : false;
|
|
1257
1258
|
}
|
|
1258
1259
|
function toRaw(observed) {
|
|
1259
1260
|
const raw = observed && observed["__v_raw"];
|
|
@@ -1536,7 +1537,10 @@ getter: `, this.getter);
|
|
|
1536
1537
|
instance,
|
|
1537
1538
|
11,
|
|
1538
1539
|
[
|
|
1539
|
-
msg + args.
|
|
1540
|
+
msg + args.map((a) => {
|
|
1541
|
+
var _a, _b;
|
|
1542
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1543
|
+
}).join(""),
|
|
1540
1544
|
instance && instance.proxy,
|
|
1541
1545
|
trace.map(
|
|
1542
1546
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -1712,11 +1716,17 @@ getter: `, this.getter);
|
|
|
1712
1716
|
}
|
|
1713
1717
|
return res;
|
|
1714
1718
|
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1719
|
+
if (isArray(fn)) {
|
|
1720
|
+
const values = [];
|
|
1721
|
+
for (let i = 0; i < fn.length; i++) {
|
|
1722
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1723
|
+
}
|
|
1724
|
+
return values;
|
|
1725
|
+
} else {
|
|
1726
|
+
warn$1(
|
|
1727
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
1728
|
+
);
|
|
1718
1729
|
}
|
|
1719
|
-
return values;
|
|
1720
1730
|
}
|
|
1721
1731
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1722
1732
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1737,12 +1747,14 @@ getter: `, this.getter);
|
|
|
1737
1747
|
}
|
|
1738
1748
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1739
1749
|
if (appErrorHandler) {
|
|
1750
|
+
pauseTracking();
|
|
1740
1751
|
callWithErrorHandling(
|
|
1741
1752
|
appErrorHandler,
|
|
1742
1753
|
null,
|
|
1743
1754
|
10,
|
|
1744
1755
|
[err, exposedInstance, errorInfo]
|
|
1745
1756
|
);
|
|
1757
|
+
resetTracking();
|
|
1746
1758
|
return;
|
|
1747
1759
|
}
|
|
1748
1760
|
}
|
|
@@ -2118,6 +2130,8 @@ getter: `, this.getter);
|
|
|
2118
2130
|
_devtoolsComponentRemoved(component);
|
|
2119
2131
|
}
|
|
2120
2132
|
};
|
|
2133
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2134
|
+
// @__NO_SIDE_EFFECTS__
|
|
2121
2135
|
function createDevtoolsComponentHook(hook) {
|
|
2122
2136
|
return (component) => {
|
|
2123
2137
|
emit$2(
|
|
@@ -3224,7 +3238,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3224
3238
|
rendererInternals
|
|
3225
3239
|
);
|
|
3226
3240
|
} else {
|
|
3227
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3241
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
3228
3242
|
n2.suspense = n1.suspense;
|
|
3229
3243
|
n2.suspense.vnode = n2;
|
|
3230
3244
|
n2.el = n1.el;
|
|
@@ -4763,7 +4777,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4763
4777
|
return () => {
|
|
4764
4778
|
pendingCacheKey = null;
|
|
4765
4779
|
if (!slots.default) {
|
|
4766
|
-
return null;
|
|
4780
|
+
return current = null;
|
|
4767
4781
|
}
|
|
4768
4782
|
const children = slots.default();
|
|
4769
4783
|
const rawVNode = children[0];
|
|
@@ -5494,47 +5508,74 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5494
5508
|
$once: (i) => once.bind(null, i),
|
|
5495
5509
|
$off: (i) => off.bind(null, i),
|
|
5496
5510
|
$children: getCompatChildren,
|
|
5497
|
-
$listeners: getCompatListeners
|
|
5511
|
+
$listeners: getCompatListeners,
|
|
5512
|
+
// inject additional properties into $options for compat
|
|
5513
|
+
// e.g. vuex needs this.$options.parent
|
|
5514
|
+
$options: (i) => {
|
|
5515
|
+
if (!isCompatEnabled("PRIVATE_APIS", i)) {
|
|
5516
|
+
return resolveMergedOptions(i);
|
|
5517
|
+
}
|
|
5518
|
+
if (i.resolvedOptions) {
|
|
5519
|
+
return i.resolvedOptions;
|
|
5520
|
+
}
|
|
5521
|
+
const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
|
|
5522
|
+
Object.defineProperties(res, {
|
|
5523
|
+
parent: {
|
|
5524
|
+
get() {
|
|
5525
|
+
warnDeprecation("PRIVATE_APIS", i, "$options.parent");
|
|
5526
|
+
return i.proxy.$parent;
|
|
5527
|
+
}
|
|
5528
|
+
},
|
|
5529
|
+
propsData: {
|
|
5530
|
+
get() {
|
|
5531
|
+
warnDeprecation(
|
|
5532
|
+
"PRIVATE_APIS",
|
|
5533
|
+
i,
|
|
5534
|
+
"$options.propsData"
|
|
5535
|
+
);
|
|
5536
|
+
return i.vnode.props;
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
});
|
|
5540
|
+
return res;
|
|
5541
|
+
}
|
|
5498
5542
|
});
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
_d: () => legacyBindDynamicKeys,
|
|
5536
|
-
_p: () => legacyPrependModifier
|
|
5537
|
-
});
|
|
5543
|
+
const privateAPIs = {
|
|
5544
|
+
// needed by many libs / render fns
|
|
5545
|
+
$vnode: (i) => i.vnode,
|
|
5546
|
+
// some private properties that are likely accessed...
|
|
5547
|
+
_self: (i) => i.proxy,
|
|
5548
|
+
_uid: (i) => i.uid,
|
|
5549
|
+
_data: (i) => i.data,
|
|
5550
|
+
_isMounted: (i) => i.isMounted,
|
|
5551
|
+
_isDestroyed: (i) => i.isUnmounted,
|
|
5552
|
+
// v2 render helpers
|
|
5553
|
+
$createElement: () => compatH,
|
|
5554
|
+
_c: () => compatH,
|
|
5555
|
+
_o: () => legacyMarkOnce,
|
|
5556
|
+
_n: () => looseToNumber,
|
|
5557
|
+
_s: () => toDisplayString,
|
|
5558
|
+
_l: () => renderList,
|
|
5559
|
+
_t: (i) => legacyRenderSlot.bind(null, i),
|
|
5560
|
+
_q: () => looseEqual,
|
|
5561
|
+
_i: () => looseIndexOf,
|
|
5562
|
+
_m: (i) => legacyRenderStatic.bind(null, i),
|
|
5563
|
+
_f: () => resolveFilter$1,
|
|
5564
|
+
_k: (i) => legacyCheckKeyCodes.bind(null, i),
|
|
5565
|
+
_b: () => legacyBindObjectProps,
|
|
5566
|
+
_v: () => createTextVNode,
|
|
5567
|
+
_e: () => createCommentVNode,
|
|
5568
|
+
_u: () => legacyresolveScopedSlots,
|
|
5569
|
+
_g: () => legacyBindObjectListeners,
|
|
5570
|
+
_d: () => legacyBindDynamicKeys,
|
|
5571
|
+
_p: () => legacyPrependModifier
|
|
5572
|
+
};
|
|
5573
|
+
for (const key in privateAPIs) {
|
|
5574
|
+
map[key] = (i) => {
|
|
5575
|
+
if (isCompatEnabled("PRIVATE_APIS", i)) {
|
|
5576
|
+
return privateAPIs[key](i);
|
|
5577
|
+
}
|
|
5578
|
+
};
|
|
5538
5579
|
}
|
|
5539
5580
|
}
|
|
5540
5581
|
|
|
@@ -5575,6 +5616,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5575
5616
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
5576
5617
|
const PublicInstanceProxyHandlers = {
|
|
5577
5618
|
get({ _: instance }, key) {
|
|
5619
|
+
if (key === "__v_skip") {
|
|
5620
|
+
return true;
|
|
5621
|
+
}
|
|
5578
5622
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
5579
5623
|
if (key === "__isVue") {
|
|
5580
5624
|
return true;
|
|
@@ -6429,7 +6473,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6429
6473
|
return vm;
|
|
6430
6474
|
}
|
|
6431
6475
|
}
|
|
6432
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6476
|
+
Vue.version = `2.6.14-compat:${"3.4.22"}`;
|
|
6433
6477
|
Vue.config = singletonApp.config;
|
|
6434
6478
|
Vue.use = (p, ...options) => {
|
|
6435
6479
|
if (p && isFunction(p.install)) {
|
|
@@ -6623,15 +6667,14 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6623
6667
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
6624
6668
|
}
|
|
6625
6669
|
let hasPrototypeAugmentations = false;
|
|
6626
|
-
const
|
|
6627
|
-
for (const key in descriptors) {
|
|
6670
|
+
for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
|
|
6628
6671
|
if (key !== "constructor") {
|
|
6629
6672
|
hasPrototypeAugmentations = true;
|
|
6630
6673
|
if (enabled) {
|
|
6631
6674
|
Object.defineProperty(
|
|
6632
6675
|
app.config.globalProperties,
|
|
6633
6676
|
key,
|
|
6634
|
-
|
|
6677
|
+
Object.getOwnPropertyDescriptor(Ctor.prototype, key)
|
|
6635
6678
|
);
|
|
6636
6679
|
}
|
|
6637
6680
|
}
|
|
@@ -7067,10 +7110,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7067
7110
|
return false;
|
|
7068
7111
|
}
|
|
7069
7112
|
|
|
7113
|
+
const attrsProto = {};
|
|
7070
7114
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
7071
7115
|
const props = {};
|
|
7072
|
-
const attrs =
|
|
7073
|
-
def(attrs, InternalObjectKey, 1);
|
|
7116
|
+
const attrs = Object.create(attrsProto);
|
|
7074
7117
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
7075
7118
|
setFullProps(instance, rawProps, props, attrs);
|
|
7076
7119
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -7192,7 +7235,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7192
7235
|
}
|
|
7193
7236
|
}
|
|
7194
7237
|
if (hasAttrsChanged) {
|
|
7195
|
-
trigger(instance, "set", "
|
|
7238
|
+
trigger(instance.attrs, "set", "");
|
|
7196
7239
|
}
|
|
7197
7240
|
{
|
|
7198
7241
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -7550,7 +7593,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7550
7593
|
const type = children._;
|
|
7551
7594
|
if (type) {
|
|
7552
7595
|
instance.slots = toRaw(children);
|
|
7553
|
-
def(
|
|
7596
|
+
def(instance.slots, "_", type);
|
|
7554
7597
|
} else {
|
|
7555
7598
|
normalizeObjectSlots(
|
|
7556
7599
|
children,
|
|
@@ -7564,7 +7607,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7564
7607
|
normalizeVNodeSlots(instance, children);
|
|
7565
7608
|
}
|
|
7566
7609
|
}
|
|
7567
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
7568
7610
|
};
|
|
7569
7611
|
const updateSlots = (instance, children, optimized) => {
|
|
7570
7612
|
const { vnode, slots } = instance;
|
|
@@ -7736,6 +7778,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7736
7778
|
}
|
|
7737
7779
|
};
|
|
7738
7780
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
7781
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
7739
7782
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
7740
7783
|
const onMismatch = () => handleMismatch(
|
|
7741
7784
|
node,
|
|
@@ -10255,7 +10298,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
10255
10298
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
10256
10299
|
);
|
|
10257
10300
|
};
|
|
10258
|
-
const InternalObjectKey = `__vInternal`;
|
|
10259
10301
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
10260
10302
|
const normalizeRef = ({
|
|
10261
10303
|
ref,
|
|
@@ -10395,7 +10437,7 @@ Component that was made reactive: `,
|
|
|
10395
10437
|
function guardReactiveProps(props) {
|
|
10396
10438
|
if (!props)
|
|
10397
10439
|
return null;
|
|
10398
|
-
return isProxy(props) ||
|
|
10440
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
10399
10441
|
}
|
|
10400
10442
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10401
10443
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -10503,7 +10545,7 @@ Component that was made reactive: `,
|
|
|
10503
10545
|
} else {
|
|
10504
10546
|
type = 32;
|
|
10505
10547
|
const slotFlag = children._;
|
|
10506
|
-
if (!slotFlag
|
|
10548
|
+
if (!slotFlag) {
|
|
10507
10549
|
children._ctx = currentRenderingInstance;
|
|
10508
10550
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
10509
10551
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -10724,7 +10766,7 @@ Component that was made reactive: `,
|
|
|
10724
10766
|
}
|
|
10725
10767
|
}
|
|
10726
10768
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
10727
|
-
instance.proxy =
|
|
10769
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
10728
10770
|
{
|
|
10729
10771
|
exposePropsOnRenderContext(instance);
|
|
10730
10772
|
}
|
|
@@ -10868,26 +10910,21 @@ Component that was made reactive: `,
|
|
|
10868
10910
|
}
|
|
10869
10911
|
}
|
|
10870
10912
|
}
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
return false;
|
|
10887
|
-
}
|
|
10888
|
-
}
|
|
10889
|
-
));
|
|
10890
|
-
}
|
|
10913
|
+
const attrsProxyHandlers = {
|
|
10914
|
+
get(target, key) {
|
|
10915
|
+
markAttrsAccessed();
|
|
10916
|
+
track(target, "get", "");
|
|
10917
|
+
return target[key];
|
|
10918
|
+
},
|
|
10919
|
+
set() {
|
|
10920
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
10921
|
+
return false;
|
|
10922
|
+
},
|
|
10923
|
+
deleteProperty() {
|
|
10924
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
10925
|
+
return false;
|
|
10926
|
+
}
|
|
10927
|
+
} ;
|
|
10891
10928
|
function getSlotsProxy(instance) {
|
|
10892
10929
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
10893
10930
|
get(target, key) {
|
|
@@ -10921,9 +10958,10 @@ Component that was made reactive: `,
|
|
|
10921
10958
|
instance.exposed = exposed || {};
|
|
10922
10959
|
};
|
|
10923
10960
|
{
|
|
10961
|
+
let attrsProxy;
|
|
10924
10962
|
return Object.freeze({
|
|
10925
10963
|
get attrs() {
|
|
10926
|
-
return
|
|
10964
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
10927
10965
|
},
|
|
10928
10966
|
get slots() {
|
|
10929
10967
|
return getSlotsProxy(instance);
|
|
@@ -11268,7 +11306,7 @@ Component that was made reactive: `,
|
|
|
11268
11306
|
return true;
|
|
11269
11307
|
}
|
|
11270
11308
|
|
|
11271
|
-
const version = "3.4.
|
|
11309
|
+
const version = "3.4.22";
|
|
11272
11310
|
const warn = warn$1 ;
|
|
11273
11311
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11274
11312
|
const devtools = devtools$1 ;
|
|
@@ -11738,8 +11776,8 @@ Component that was made reactive: `,
|
|
|
11738
11776
|
setVarsOnVNode(instance.subTree, vars);
|
|
11739
11777
|
updateTeleports(vars);
|
|
11740
11778
|
};
|
|
11741
|
-
watchPostEffect(setVars);
|
|
11742
11779
|
onMounted(() => {
|
|
11780
|
+
watchPostEffect(setVars);
|
|
11743
11781
|
const ob = new MutationObserver(setVars);
|
|
11744
11782
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11745
11783
|
onUnmounted(() => ob.disconnect());
|
|
@@ -11941,15 +11979,15 @@ Component that was made reactive: `,
|
|
|
11941
11979
|
const tag = el.tagName;
|
|
11942
11980
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11943
11981
|
!tag.includes("-")) {
|
|
11944
|
-
el._value = value;
|
|
11945
11982
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
11946
11983
|
const newValue = value == null ? "" : value;
|
|
11947
|
-
if (oldValue !== newValue) {
|
|
11984
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
11948
11985
|
el.value = newValue;
|
|
11949
11986
|
}
|
|
11950
11987
|
if (value == null) {
|
|
11951
11988
|
el.removeAttribute(key);
|
|
11952
11989
|
}
|
|
11990
|
+
el._value = value;
|
|
11953
11991
|
return;
|
|
11954
11992
|
}
|
|
11955
11993
|
let needRemove = false;
|
|
@@ -12005,11 +12043,14 @@ Component that was made reactive: `,
|
|
|
12005
12043
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
12006
12044
|
const existingInvoker = invokers[rawName];
|
|
12007
12045
|
if (nextValue && existingInvoker) {
|
|
12008
|
-
existingInvoker.value = nextValue;
|
|
12046
|
+
existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
|
|
12009
12047
|
} else {
|
|
12010
12048
|
const [name, options] = parseName(rawName);
|
|
12011
12049
|
if (nextValue) {
|
|
12012
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
12050
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
12051
|
+
sanitizeEventValue(nextValue, rawName) ,
|
|
12052
|
+
instance
|
|
12053
|
+
);
|
|
12013
12054
|
addEventListener(el, name, invoker, options);
|
|
12014
12055
|
} else if (existingInvoker) {
|
|
12015
12056
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -12052,6 +12093,16 @@ Component that was made reactive: `,
|
|
|
12052
12093
|
invoker.attached = getNow();
|
|
12053
12094
|
return invoker;
|
|
12054
12095
|
}
|
|
12096
|
+
function sanitizeEventValue(value, propName) {
|
|
12097
|
+
if (isFunction(value) || isArray(value)) {
|
|
12098
|
+
return value;
|
|
12099
|
+
}
|
|
12100
|
+
warn(
|
|
12101
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
12102
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
12103
|
+
);
|
|
12104
|
+
return NOOP;
|
|
12105
|
+
}
|
|
12055
12106
|
function patchStopImmediatePropagation(e, value) {
|
|
12056
12107
|
if (isArray(value)) {
|
|
12057
12108
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -12059,7 +12110,9 @@ Component that was made reactive: `,
|
|
|
12059
12110
|
originalStop.call(e);
|
|
12060
12111
|
e._stopped = true;
|
|
12061
12112
|
};
|
|
12062
|
-
return value.map(
|
|
12113
|
+
return value.map(
|
|
12114
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
12115
|
+
);
|
|
12063
12116
|
} else {
|
|
12064
12117
|
return value;
|
|
12065
12118
|
}
|
|
@@ -12260,7 +12313,7 @@ Component that was made reactive: `,
|
|
|
12260
12313
|
}
|
|
12261
12314
|
}
|
|
12262
12315
|
_setAttr(key) {
|
|
12263
|
-
let value = this.getAttribute(key);
|
|
12316
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
12264
12317
|
const camelKey = camelize(key);
|
|
12265
12318
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
12266
12319
|
value = toNumber(value);
|
|
@@ -12420,7 +12473,28 @@ Component that was made reactive: `,
|
|
|
12420
12473
|
)) {
|
|
12421
12474
|
tag = "span";
|
|
12422
12475
|
}
|
|
12423
|
-
prevChildren =
|
|
12476
|
+
prevChildren = [];
|
|
12477
|
+
if (children) {
|
|
12478
|
+
for (let i = 0; i < children.length; i++) {
|
|
12479
|
+
const child = children[i];
|
|
12480
|
+
if (child.el && child.el instanceof Element) {
|
|
12481
|
+
prevChildren.push(child);
|
|
12482
|
+
setTransitionHooks(
|
|
12483
|
+
child,
|
|
12484
|
+
resolveTransitionHooks(
|
|
12485
|
+
child,
|
|
12486
|
+
cssTransitionProps,
|
|
12487
|
+
state,
|
|
12488
|
+
instance
|
|
12489
|
+
)
|
|
12490
|
+
);
|
|
12491
|
+
positionMap.set(
|
|
12492
|
+
child,
|
|
12493
|
+
child.el.getBoundingClientRect()
|
|
12494
|
+
);
|
|
12495
|
+
}
|
|
12496
|
+
}
|
|
12497
|
+
}
|
|
12424
12498
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
12425
12499
|
for (let i = 0; i < children.length; i++) {
|
|
12426
12500
|
const child = children[i];
|
|
@@ -12433,16 +12507,6 @@ Component that was made reactive: `,
|
|
|
12433
12507
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12434
12508
|
}
|
|
12435
12509
|
}
|
|
12436
|
-
if (prevChildren) {
|
|
12437
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
12438
|
-
const child = prevChildren[i];
|
|
12439
|
-
setTransitionHooks(
|
|
12440
|
-
child,
|
|
12441
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
12442
|
-
);
|
|
12443
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
12444
|
-
}
|
|
12445
|
-
}
|
|
12446
12510
|
return createVNode(tag, null, children);
|
|
12447
12511
|
};
|
|
12448
12512
|
}
|
|
@@ -12544,7 +12608,7 @@ Component that was made reactive: `,
|
|
|
12544
12608
|
el[assignKey] = getModelAssigner(vnode);
|
|
12545
12609
|
if (el.composing)
|
|
12546
12610
|
return;
|
|
12547
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12611
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
12548
12612
|
const newValue = value == null ? "" : value;
|
|
12549
12613
|
if (elValue === newValue) {
|
|
12550
12614
|
return;
|
|
@@ -12647,14 +12711,14 @@ Component that was made reactive: `,
|
|
|
12647
12711
|
// set value in mounted & updated because <select> relies on its children
|
|
12648
12712
|
// <option>s.
|
|
12649
12713
|
mounted(el, { value, modifiers: { number } }) {
|
|
12650
|
-
setSelected(el, value
|
|
12714
|
+
setSelected(el, value);
|
|
12651
12715
|
},
|
|
12652
12716
|
beforeUpdate(el, _binding, vnode) {
|
|
12653
12717
|
el[assignKey] = getModelAssigner(vnode);
|
|
12654
12718
|
},
|
|
12655
12719
|
updated(el, { value, modifiers: { number } }) {
|
|
12656
12720
|
if (!el._assigning) {
|
|
12657
|
-
setSelected(el, value
|
|
12721
|
+
setSelected(el, value);
|
|
12658
12722
|
}
|
|
12659
12723
|
}
|
|
12660
12724
|
};
|
|
@@ -12674,9 +12738,7 @@ Component that was made reactive: `,
|
|
|
12674
12738
|
if (isArrayValue) {
|
|
12675
12739
|
const optionType = typeof optionValue;
|
|
12676
12740
|
if (optionType === "string" || optionType === "number") {
|
|
12677
|
-
option.selected = value.
|
|
12678
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
12679
|
-
);
|
|
12741
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
12680
12742
|
} else {
|
|
12681
12743
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
12682
12744
|
}
|