@vue/compat 3.4.21 → 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 +205 -124
- package/dist/vue.cjs.prod.js +172 -116
- package/dist/vue.esm-browser.js +203 -124
- package/dist/vue.esm-browser.prod.js +6 -5
- package/dist/vue.esm-bundler.js +211 -134
- package/dist/vue.global.js +203 -124
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +180 -121
- package/dist/vue.runtime.esm-browser.prod.js +6 -5
- package/dist/vue.runtime.esm-bundler.js +188 -131
- package/dist/vue.runtime.global.js +180 -121
- 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"];
|
|
@@ -1715,11 +1716,17 @@ getter: `, this.getter);
|
|
|
1715
1716
|
}
|
|
1716
1717
|
return res;
|
|
1717
1718
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
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
|
+
);
|
|
1721
1729
|
}
|
|
1722
|
-
return values;
|
|
1723
1730
|
}
|
|
1724
1731
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1725
1732
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1740,12 +1747,14 @@ getter: `, this.getter);
|
|
|
1740
1747
|
}
|
|
1741
1748
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1742
1749
|
if (appErrorHandler) {
|
|
1750
|
+
pauseTracking();
|
|
1743
1751
|
callWithErrorHandling(
|
|
1744
1752
|
appErrorHandler,
|
|
1745
1753
|
null,
|
|
1746
1754
|
10,
|
|
1747
1755
|
[err, exposedInstance, errorInfo]
|
|
1748
1756
|
);
|
|
1757
|
+
resetTracking();
|
|
1749
1758
|
return;
|
|
1750
1759
|
}
|
|
1751
1760
|
}
|
|
@@ -2121,6 +2130,8 @@ getter: `, this.getter);
|
|
|
2121
2130
|
_devtoolsComponentRemoved(component);
|
|
2122
2131
|
}
|
|
2123
2132
|
};
|
|
2133
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2134
|
+
// @__NO_SIDE_EFFECTS__
|
|
2124
2135
|
function createDevtoolsComponentHook(hook) {
|
|
2125
2136
|
return (component) => {
|
|
2126
2137
|
emit$2(
|
|
@@ -4766,7 +4777,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4766
4777
|
return () => {
|
|
4767
4778
|
pendingCacheKey = null;
|
|
4768
4779
|
if (!slots.default) {
|
|
4769
|
-
return null;
|
|
4780
|
+
return current = null;
|
|
4770
4781
|
}
|
|
4771
4782
|
const children = slots.default();
|
|
4772
4783
|
const rawVNode = children[0];
|
|
@@ -5497,47 +5508,74 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5497
5508
|
$once: (i) => once.bind(null, i),
|
|
5498
5509
|
$off: (i) => off.bind(null, i),
|
|
5499
5510
|
$children: getCompatChildren,
|
|
5500
|
-
$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
|
+
}
|
|
5501
5542
|
});
|
|
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
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
_d: () => legacyBindDynamicKeys,
|
|
5539
|
-
_p: () => legacyPrependModifier
|
|
5540
|
-
});
|
|
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
|
+
};
|
|
5541
5579
|
}
|
|
5542
5580
|
}
|
|
5543
5581
|
|
|
@@ -5578,6 +5616,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5578
5616
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
5579
5617
|
const PublicInstanceProxyHandlers = {
|
|
5580
5618
|
get({ _: instance }, key) {
|
|
5619
|
+
if (key === "__v_skip") {
|
|
5620
|
+
return true;
|
|
5621
|
+
}
|
|
5581
5622
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
5582
5623
|
if (key === "__isVue") {
|
|
5583
5624
|
return true;
|
|
@@ -6432,7 +6473,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6432
6473
|
return vm;
|
|
6433
6474
|
}
|
|
6434
6475
|
}
|
|
6435
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6476
|
+
Vue.version = `2.6.14-compat:${"3.4.22"}`;
|
|
6436
6477
|
Vue.config = singletonApp.config;
|
|
6437
6478
|
Vue.use = (p, ...options) => {
|
|
6438
6479
|
if (p && isFunction(p.install)) {
|
|
@@ -6626,15 +6667,14 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6626
6667
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
6627
6668
|
}
|
|
6628
6669
|
let hasPrototypeAugmentations = false;
|
|
6629
|
-
const
|
|
6630
|
-
for (const key in descriptors) {
|
|
6670
|
+
for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
|
|
6631
6671
|
if (key !== "constructor") {
|
|
6632
6672
|
hasPrototypeAugmentations = true;
|
|
6633
6673
|
if (enabled) {
|
|
6634
6674
|
Object.defineProperty(
|
|
6635
6675
|
app.config.globalProperties,
|
|
6636
6676
|
key,
|
|
6637
|
-
|
|
6677
|
+
Object.getOwnPropertyDescriptor(Ctor.prototype, key)
|
|
6638
6678
|
);
|
|
6639
6679
|
}
|
|
6640
6680
|
}
|
|
@@ -7070,10 +7110,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7070
7110
|
return false;
|
|
7071
7111
|
}
|
|
7072
7112
|
|
|
7113
|
+
const attrsProto = {};
|
|
7073
7114
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
7074
7115
|
const props = {};
|
|
7075
|
-
const attrs =
|
|
7076
|
-
def(attrs, InternalObjectKey, 1);
|
|
7116
|
+
const attrs = Object.create(attrsProto);
|
|
7077
7117
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
7078
7118
|
setFullProps(instance, rawProps, props, attrs);
|
|
7079
7119
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -7195,7 +7235,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7195
7235
|
}
|
|
7196
7236
|
}
|
|
7197
7237
|
if (hasAttrsChanged) {
|
|
7198
|
-
trigger(instance, "set", "
|
|
7238
|
+
trigger(instance.attrs, "set", "");
|
|
7199
7239
|
}
|
|
7200
7240
|
{
|
|
7201
7241
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -7553,7 +7593,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7553
7593
|
const type = children._;
|
|
7554
7594
|
if (type) {
|
|
7555
7595
|
instance.slots = toRaw(children);
|
|
7556
|
-
def(
|
|
7596
|
+
def(instance.slots, "_", type);
|
|
7557
7597
|
} else {
|
|
7558
7598
|
normalizeObjectSlots(
|
|
7559
7599
|
children,
|
|
@@ -7567,7 +7607,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7567
7607
|
normalizeVNodeSlots(instance, children);
|
|
7568
7608
|
}
|
|
7569
7609
|
}
|
|
7570
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
7571
7610
|
};
|
|
7572
7611
|
const updateSlots = (instance, children, optimized) => {
|
|
7573
7612
|
const { vnode, slots } = instance;
|
|
@@ -7739,6 +7778,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7739
7778
|
}
|
|
7740
7779
|
};
|
|
7741
7780
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
7781
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
7742
7782
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
7743
7783
|
const onMismatch = () => handleMismatch(
|
|
7744
7784
|
node,
|
|
@@ -10258,7 +10298,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
10258
10298
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
10259
10299
|
);
|
|
10260
10300
|
};
|
|
10261
|
-
const InternalObjectKey = `__vInternal`;
|
|
10262
10301
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
10263
10302
|
const normalizeRef = ({
|
|
10264
10303
|
ref,
|
|
@@ -10398,7 +10437,7 @@ Component that was made reactive: `,
|
|
|
10398
10437
|
function guardReactiveProps(props) {
|
|
10399
10438
|
if (!props)
|
|
10400
10439
|
return null;
|
|
10401
|
-
return isProxy(props) ||
|
|
10440
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
10402
10441
|
}
|
|
10403
10442
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10404
10443
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -10506,7 +10545,7 @@ Component that was made reactive: `,
|
|
|
10506
10545
|
} else {
|
|
10507
10546
|
type = 32;
|
|
10508
10547
|
const slotFlag = children._;
|
|
10509
|
-
if (!slotFlag
|
|
10548
|
+
if (!slotFlag) {
|
|
10510
10549
|
children._ctx = currentRenderingInstance;
|
|
10511
10550
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
10512
10551
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -10727,7 +10766,7 @@ Component that was made reactive: `,
|
|
|
10727
10766
|
}
|
|
10728
10767
|
}
|
|
10729
10768
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
10730
|
-
instance.proxy =
|
|
10769
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
10731
10770
|
{
|
|
10732
10771
|
exposePropsOnRenderContext(instance);
|
|
10733
10772
|
}
|
|
@@ -10871,26 +10910,21 @@ Component that was made reactive: `,
|
|
|
10871
10910
|
}
|
|
10872
10911
|
}
|
|
10873
10912
|
}
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
return false;
|
|
10890
|
-
}
|
|
10891
|
-
}
|
|
10892
|
-
));
|
|
10893
|
-
}
|
|
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
|
+
} ;
|
|
10894
10928
|
function getSlotsProxy(instance) {
|
|
10895
10929
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
10896
10930
|
get(target, key) {
|
|
@@ -10924,9 +10958,10 @@ Component that was made reactive: `,
|
|
|
10924
10958
|
instance.exposed = exposed || {};
|
|
10925
10959
|
};
|
|
10926
10960
|
{
|
|
10961
|
+
let attrsProxy;
|
|
10927
10962
|
return Object.freeze({
|
|
10928
10963
|
get attrs() {
|
|
10929
|
-
return
|
|
10964
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
10930
10965
|
},
|
|
10931
10966
|
get slots() {
|
|
10932
10967
|
return getSlotsProxy(instance);
|
|
@@ -11271,7 +11306,7 @@ Component that was made reactive: `,
|
|
|
11271
11306
|
return true;
|
|
11272
11307
|
}
|
|
11273
11308
|
|
|
11274
|
-
const version = "3.4.
|
|
11309
|
+
const version = "3.4.22";
|
|
11275
11310
|
const warn = warn$1 ;
|
|
11276
11311
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11277
11312
|
const devtools = devtools$1 ;
|
|
@@ -11741,8 +11776,8 @@ Component that was made reactive: `,
|
|
|
11741
11776
|
setVarsOnVNode(instance.subTree, vars);
|
|
11742
11777
|
updateTeleports(vars);
|
|
11743
11778
|
};
|
|
11744
|
-
watchPostEffect(setVars);
|
|
11745
11779
|
onMounted(() => {
|
|
11780
|
+
watchPostEffect(setVars);
|
|
11746
11781
|
const ob = new MutationObserver(setVars);
|
|
11747
11782
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11748
11783
|
onUnmounted(() => ob.disconnect());
|
|
@@ -12008,11 +12043,14 @@ Component that was made reactive: `,
|
|
|
12008
12043
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
12009
12044
|
const existingInvoker = invokers[rawName];
|
|
12010
12045
|
if (nextValue && existingInvoker) {
|
|
12011
|
-
existingInvoker.value = nextValue;
|
|
12046
|
+
existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
|
|
12012
12047
|
} else {
|
|
12013
12048
|
const [name, options] = parseName(rawName);
|
|
12014
12049
|
if (nextValue) {
|
|
12015
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
12050
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
12051
|
+
sanitizeEventValue(nextValue, rawName) ,
|
|
12052
|
+
instance
|
|
12053
|
+
);
|
|
12016
12054
|
addEventListener(el, name, invoker, options);
|
|
12017
12055
|
} else if (existingInvoker) {
|
|
12018
12056
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -12055,6 +12093,16 @@ Component that was made reactive: `,
|
|
|
12055
12093
|
invoker.attached = getNow();
|
|
12056
12094
|
return invoker;
|
|
12057
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
|
+
}
|
|
12058
12106
|
function patchStopImmediatePropagation(e, value) {
|
|
12059
12107
|
if (isArray(value)) {
|
|
12060
12108
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -12062,7 +12110,9 @@ Component that was made reactive: `,
|
|
|
12062
12110
|
originalStop.call(e);
|
|
12063
12111
|
e._stopped = true;
|
|
12064
12112
|
};
|
|
12065
|
-
return value.map(
|
|
12113
|
+
return value.map(
|
|
12114
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
12115
|
+
);
|
|
12066
12116
|
} else {
|
|
12067
12117
|
return value;
|
|
12068
12118
|
}
|
|
@@ -12263,7 +12313,7 @@ Component that was made reactive: `,
|
|
|
12263
12313
|
}
|
|
12264
12314
|
}
|
|
12265
12315
|
_setAttr(key) {
|
|
12266
|
-
let value = this.getAttribute(key);
|
|
12316
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
12267
12317
|
const camelKey = camelize(key);
|
|
12268
12318
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
12269
12319
|
value = toNumber(value);
|
|
@@ -12423,7 +12473,28 @@ Component that was made reactive: `,
|
|
|
12423
12473
|
)) {
|
|
12424
12474
|
tag = "span";
|
|
12425
12475
|
}
|
|
12426
|
-
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
|
+
}
|
|
12427
12498
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
12428
12499
|
for (let i = 0; i < children.length; i++) {
|
|
12429
12500
|
const child = children[i];
|
|
@@ -12436,16 +12507,6 @@ Component that was made reactive: `,
|
|
|
12436
12507
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12437
12508
|
}
|
|
12438
12509
|
}
|
|
12439
|
-
if (prevChildren) {
|
|
12440
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
12441
|
-
const child = prevChildren[i];
|
|
12442
|
-
setTransitionHooks(
|
|
12443
|
-
child,
|
|
12444
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
12445
|
-
);
|
|
12446
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
12447
|
-
}
|
|
12448
|
-
}
|
|
12449
12510
|
return createVNode(tag, null, children);
|
|
12450
12511
|
};
|
|
12451
12512
|
}
|
|
@@ -12547,7 +12608,7 @@ Component that was made reactive: `,
|
|
|
12547
12608
|
el[assignKey] = getModelAssigner(vnode);
|
|
12548
12609
|
if (el.composing)
|
|
12549
12610
|
return;
|
|
12550
|
-
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;
|
|
12551
12612
|
const newValue = value == null ? "" : value;
|
|
12552
12613
|
if (elValue === newValue) {
|
|
12553
12614
|
return;
|
|
@@ -12650,14 +12711,14 @@ Component that was made reactive: `,
|
|
|
12650
12711
|
// set value in mounted & updated because <select> relies on its children
|
|
12651
12712
|
// <option>s.
|
|
12652
12713
|
mounted(el, { value, modifiers: { number } }) {
|
|
12653
|
-
setSelected(el, value
|
|
12714
|
+
setSelected(el, value);
|
|
12654
12715
|
},
|
|
12655
12716
|
beforeUpdate(el, _binding, vnode) {
|
|
12656
12717
|
el[assignKey] = getModelAssigner(vnode);
|
|
12657
12718
|
},
|
|
12658
12719
|
updated(el, { value, modifiers: { number } }) {
|
|
12659
12720
|
if (!el._assigning) {
|
|
12660
|
-
setSelected(el, value
|
|
12721
|
+
setSelected(el, value);
|
|
12661
12722
|
}
|
|
12662
12723
|
}
|
|
12663
12724
|
};
|
|
@@ -12677,9 +12738,7 @@ Component that was made reactive: `,
|
|
|
12677
12738
|
if (isArrayValue) {
|
|
12678
12739
|
const optionType = typeof optionValue;
|
|
12679
12740
|
if (optionType === "string" || optionType === "number") {
|
|
12680
|
-
option.selected = value.
|
|
12681
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
12682
|
-
);
|
|
12741
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
12683
12742
|
} else {
|
|
12684
12743
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
12685
12744
|
}
|