@vue/compat 3.4.21 → 3.4.23
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 +211 -127
- package/dist/vue.cjs.prod.js +178 -119
- package/dist/vue.esm-browser.js +209 -127
- package/dist/vue.esm-browser.prod.js +6 -5
- package/dist/vue.esm-bundler.js +217 -137
- package/dist/vue.global.js +209 -127
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +186 -124
- package/dist/vue.runtime.esm-browser.prod.js +6 -5
- package/dist/vue.runtime.esm-bundler.js +194 -134
- package/dist/vue.runtime.global.js +186 -124
- 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.23
|
|
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;
|
|
@@ -5620,7 +5661,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5620
5661
|
let cssModule, globalProperties;
|
|
5621
5662
|
if (publicGetter) {
|
|
5622
5663
|
if (key === "$attrs") {
|
|
5623
|
-
track(instance, "get",
|
|
5664
|
+
track(instance.attrs, "get", "");
|
|
5624
5665
|
markAttrsAccessed();
|
|
5625
5666
|
} else if (key === "$slots") {
|
|
5626
5667
|
track(instance, "get", key);
|
|
@@ -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.23"}`;
|
|
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,13 @@ 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 internalObjectProto = /* @__PURE__ */ Object.create(null);
|
|
7114
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
7115
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
7116
|
+
|
|
7073
7117
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
7074
7118
|
const props = {};
|
|
7075
|
-
const attrs =
|
|
7076
|
-
def(attrs, InternalObjectKey, 1);
|
|
7119
|
+
const attrs = createInternalObject();
|
|
7077
7120
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
7078
7121
|
setFullProps(instance, rawProps, props, attrs);
|
|
7079
7122
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -7195,7 +7238,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7195
7238
|
}
|
|
7196
7239
|
}
|
|
7197
7240
|
if (hasAttrsChanged) {
|
|
7198
|
-
trigger(instance, "set", "
|
|
7241
|
+
trigger(instance.attrs, "set", "");
|
|
7199
7242
|
}
|
|
7200
7243
|
{
|
|
7201
7244
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -7553,21 +7596,20 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7553
7596
|
const type = children._;
|
|
7554
7597
|
if (type) {
|
|
7555
7598
|
instance.slots = toRaw(children);
|
|
7556
|
-
def(
|
|
7599
|
+
def(instance.slots, "_", type);
|
|
7557
7600
|
} else {
|
|
7558
7601
|
normalizeObjectSlots(
|
|
7559
7602
|
children,
|
|
7560
|
-
instance.slots =
|
|
7603
|
+
instance.slots = createInternalObject(),
|
|
7561
7604
|
instance
|
|
7562
7605
|
);
|
|
7563
7606
|
}
|
|
7564
7607
|
} else {
|
|
7565
|
-
instance.slots =
|
|
7608
|
+
instance.slots = createInternalObject();
|
|
7566
7609
|
if (children) {
|
|
7567
7610
|
normalizeVNodeSlots(instance, children);
|
|
7568
7611
|
}
|
|
7569
7612
|
}
|
|
7570
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
7571
7613
|
};
|
|
7572
7614
|
const updateSlots = (instance, children, optimized) => {
|
|
7573
7615
|
const { vnode, slots } = instance;
|
|
@@ -7739,6 +7781,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7739
7781
|
}
|
|
7740
7782
|
};
|
|
7741
7783
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
7784
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
7742
7785
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
7743
7786
|
const onMismatch = () => handleMismatch(
|
|
7744
7787
|
node,
|
|
@@ -10258,7 +10301,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
10258
10301
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
10259
10302
|
);
|
|
10260
10303
|
};
|
|
10261
|
-
const InternalObjectKey = `__vInternal`;
|
|
10262
10304
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
10263
10305
|
const normalizeRef = ({
|
|
10264
10306
|
ref,
|
|
@@ -10398,7 +10440,7 @@ Component that was made reactive: `,
|
|
|
10398
10440
|
function guardReactiveProps(props) {
|
|
10399
10441
|
if (!props)
|
|
10400
10442
|
return null;
|
|
10401
|
-
return isProxy(props) ||
|
|
10443
|
+
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
10402
10444
|
}
|
|
10403
10445
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10404
10446
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -10506,7 +10548,7 @@ Component that was made reactive: `,
|
|
|
10506
10548
|
} else {
|
|
10507
10549
|
type = 32;
|
|
10508
10550
|
const slotFlag = children._;
|
|
10509
|
-
if (!slotFlag && !(
|
|
10551
|
+
if (!slotFlag && !isInternalObject(children)) {
|
|
10510
10552
|
children._ctx = currentRenderingInstance;
|
|
10511
10553
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
10512
10554
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -10727,7 +10769,7 @@ Component that was made reactive: `,
|
|
|
10727
10769
|
}
|
|
10728
10770
|
}
|
|
10729
10771
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
10730
|
-
instance.proxy =
|
|
10772
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
10731
10773
|
{
|
|
10732
10774
|
exposePropsOnRenderContext(instance);
|
|
10733
10775
|
}
|
|
@@ -10871,26 +10913,21 @@ Component that was made reactive: `,
|
|
|
10871
10913
|
}
|
|
10872
10914
|
}
|
|
10873
10915
|
}
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
return false;
|
|
10890
|
-
}
|
|
10891
|
-
}
|
|
10892
|
-
));
|
|
10893
|
-
}
|
|
10916
|
+
const attrsProxyHandlers = {
|
|
10917
|
+
get(target, key) {
|
|
10918
|
+
markAttrsAccessed();
|
|
10919
|
+
track(target, "get", "");
|
|
10920
|
+
return target[key];
|
|
10921
|
+
},
|
|
10922
|
+
set() {
|
|
10923
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
10924
|
+
return false;
|
|
10925
|
+
},
|
|
10926
|
+
deleteProperty() {
|
|
10927
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
10928
|
+
return false;
|
|
10929
|
+
}
|
|
10930
|
+
} ;
|
|
10894
10931
|
function getSlotsProxy(instance) {
|
|
10895
10932
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
10896
10933
|
get(target, key) {
|
|
@@ -10924,9 +10961,10 @@ Component that was made reactive: `,
|
|
|
10924
10961
|
instance.exposed = exposed || {};
|
|
10925
10962
|
};
|
|
10926
10963
|
{
|
|
10964
|
+
let attrsProxy;
|
|
10927
10965
|
return Object.freeze({
|
|
10928
10966
|
get attrs() {
|
|
10929
|
-
return
|
|
10967
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
10930
10968
|
},
|
|
10931
10969
|
get slots() {
|
|
10932
10970
|
return getSlotsProxy(instance);
|
|
@@ -11271,7 +11309,7 @@ Component that was made reactive: `,
|
|
|
11271
11309
|
return true;
|
|
11272
11310
|
}
|
|
11273
11311
|
|
|
11274
|
-
const version = "3.4.
|
|
11312
|
+
const version = "3.4.23";
|
|
11275
11313
|
const warn = warn$1 ;
|
|
11276
11314
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11277
11315
|
const devtools = devtools$1 ;
|
|
@@ -11741,8 +11779,8 @@ Component that was made reactive: `,
|
|
|
11741
11779
|
setVarsOnVNode(instance.subTree, vars);
|
|
11742
11780
|
updateTeleports(vars);
|
|
11743
11781
|
};
|
|
11744
|
-
watchPostEffect(setVars);
|
|
11745
11782
|
onMounted(() => {
|
|
11783
|
+
watchPostEffect(setVars);
|
|
11746
11784
|
const ob = new MutationObserver(setVars);
|
|
11747
11785
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11748
11786
|
onUnmounted(() => ob.disconnect());
|
|
@@ -12008,11 +12046,14 @@ Component that was made reactive: `,
|
|
|
12008
12046
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
12009
12047
|
const existingInvoker = invokers[rawName];
|
|
12010
12048
|
if (nextValue && existingInvoker) {
|
|
12011
|
-
existingInvoker.value = nextValue;
|
|
12049
|
+
existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
|
|
12012
12050
|
} else {
|
|
12013
12051
|
const [name, options] = parseName(rawName);
|
|
12014
12052
|
if (nextValue) {
|
|
12015
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
12053
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
12054
|
+
sanitizeEventValue(nextValue, rawName) ,
|
|
12055
|
+
instance
|
|
12056
|
+
);
|
|
12016
12057
|
addEventListener(el, name, invoker, options);
|
|
12017
12058
|
} else if (existingInvoker) {
|
|
12018
12059
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -12055,6 +12096,16 @@ Component that was made reactive: `,
|
|
|
12055
12096
|
invoker.attached = getNow();
|
|
12056
12097
|
return invoker;
|
|
12057
12098
|
}
|
|
12099
|
+
function sanitizeEventValue(value, propName) {
|
|
12100
|
+
if (isFunction(value) || isArray(value)) {
|
|
12101
|
+
return value;
|
|
12102
|
+
}
|
|
12103
|
+
warn(
|
|
12104
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
12105
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
12106
|
+
);
|
|
12107
|
+
return NOOP;
|
|
12108
|
+
}
|
|
12058
12109
|
function patchStopImmediatePropagation(e, value) {
|
|
12059
12110
|
if (isArray(value)) {
|
|
12060
12111
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -12062,7 +12113,9 @@ Component that was made reactive: `,
|
|
|
12062
12113
|
originalStop.call(e);
|
|
12063
12114
|
e._stopped = true;
|
|
12064
12115
|
};
|
|
12065
|
-
return value.map(
|
|
12116
|
+
return value.map(
|
|
12117
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
12118
|
+
);
|
|
12066
12119
|
} else {
|
|
12067
12120
|
return value;
|
|
12068
12121
|
}
|
|
@@ -12263,7 +12316,7 @@ Component that was made reactive: `,
|
|
|
12263
12316
|
}
|
|
12264
12317
|
}
|
|
12265
12318
|
_setAttr(key) {
|
|
12266
|
-
let value = this.getAttribute(key);
|
|
12319
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
12267
12320
|
const camelKey = camelize(key);
|
|
12268
12321
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
12269
12322
|
value = toNumber(value);
|
|
@@ -12423,7 +12476,28 @@ Component that was made reactive: `,
|
|
|
12423
12476
|
)) {
|
|
12424
12477
|
tag = "span";
|
|
12425
12478
|
}
|
|
12426
|
-
prevChildren =
|
|
12479
|
+
prevChildren = [];
|
|
12480
|
+
if (children) {
|
|
12481
|
+
for (let i = 0; i < children.length; i++) {
|
|
12482
|
+
const child = children[i];
|
|
12483
|
+
if (child.el && child.el instanceof Element) {
|
|
12484
|
+
prevChildren.push(child);
|
|
12485
|
+
setTransitionHooks(
|
|
12486
|
+
child,
|
|
12487
|
+
resolveTransitionHooks(
|
|
12488
|
+
child,
|
|
12489
|
+
cssTransitionProps,
|
|
12490
|
+
state,
|
|
12491
|
+
instance
|
|
12492
|
+
)
|
|
12493
|
+
);
|
|
12494
|
+
positionMap.set(
|
|
12495
|
+
child,
|
|
12496
|
+
child.el.getBoundingClientRect()
|
|
12497
|
+
);
|
|
12498
|
+
}
|
|
12499
|
+
}
|
|
12500
|
+
}
|
|
12427
12501
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
12428
12502
|
for (let i = 0; i < children.length; i++) {
|
|
12429
12503
|
const child = children[i];
|
|
@@ -12436,16 +12510,6 @@ Component that was made reactive: `,
|
|
|
12436
12510
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12437
12511
|
}
|
|
12438
12512
|
}
|
|
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
12513
|
return createVNode(tag, null, children);
|
|
12450
12514
|
};
|
|
12451
12515
|
}
|
|
@@ -12547,7 +12611,7 @@ Component that was made reactive: `,
|
|
|
12547
12611
|
el[assignKey] = getModelAssigner(vnode);
|
|
12548
12612
|
if (el.composing)
|
|
12549
12613
|
return;
|
|
12550
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12614
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
12551
12615
|
const newValue = value == null ? "" : value;
|
|
12552
12616
|
if (elValue === newValue) {
|
|
12553
12617
|
return;
|
|
@@ -12650,14 +12714,14 @@ Component that was made reactive: `,
|
|
|
12650
12714
|
// set value in mounted & updated because <select> relies on its children
|
|
12651
12715
|
// <option>s.
|
|
12652
12716
|
mounted(el, { value, modifiers: { number } }) {
|
|
12653
|
-
setSelected(el, value
|
|
12717
|
+
setSelected(el, value);
|
|
12654
12718
|
},
|
|
12655
12719
|
beforeUpdate(el, _binding, vnode) {
|
|
12656
12720
|
el[assignKey] = getModelAssigner(vnode);
|
|
12657
12721
|
},
|
|
12658
12722
|
updated(el, { value, modifiers: { number } }) {
|
|
12659
12723
|
if (!el._assigning) {
|
|
12660
|
-
setSelected(el, value
|
|
12724
|
+
setSelected(el, value);
|
|
12661
12725
|
}
|
|
12662
12726
|
}
|
|
12663
12727
|
};
|
|
@@ -12677,9 +12741,7 @@ Component that was made reactive: `,
|
|
|
12677
12741
|
if (isArrayValue) {
|
|
12678
12742
|
const optionType = typeof optionValue;
|
|
12679
12743
|
if (optionType === "string" || optionType === "number") {
|
|
12680
|
-
option.selected = value.
|
|
12681
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
12682
|
-
);
|
|
12744
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
12683
12745
|
} else {
|
|
12684
12746
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
12685
12747
|
}
|