@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
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
**/
|
|
@@ -10,6 +10,8 @@ var estreeWalker = require('estree-walker');
|
|
|
10
10
|
var decode_js = require('entities/lib/decode.js');
|
|
11
11
|
var sourceMapJs = require('source-map-js');
|
|
12
12
|
|
|
13
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
14
|
+
// @__NO_SIDE_EFFECTS__
|
|
13
15
|
function makeMap(str, expectsLowerCase) {
|
|
14
16
|
const set = new Set(str.split(","));
|
|
15
17
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -335,7 +337,11 @@ const replacer = (_key, val) => {
|
|
|
335
337
|
};
|
|
336
338
|
const stringifySymbol = (v, i = "") => {
|
|
337
339
|
var _a;
|
|
338
|
-
return
|
|
340
|
+
return (
|
|
341
|
+
// Symbol.description in es2019+ so we need to cast here to pass
|
|
342
|
+
// the lib: es2016 check
|
|
343
|
+
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
344
|
+
);
|
|
339
345
|
};
|
|
340
346
|
|
|
341
347
|
let activeEffectScope;
|
|
@@ -738,6 +744,8 @@ function createArrayInstrumentations() {
|
|
|
738
744
|
return instrumentations;
|
|
739
745
|
}
|
|
740
746
|
function hasOwnProperty(key) {
|
|
747
|
+
if (!isSymbol(key))
|
|
748
|
+
key = String(key);
|
|
741
749
|
const obj = toRaw(this);
|
|
742
750
|
track(obj, "has", key);
|
|
743
751
|
return obj.hasOwnProperty(key);
|
|
@@ -1066,23 +1074,16 @@ function createInstrumentations() {
|
|
|
1066
1074
|
clear: createReadonlyMethod("clear"),
|
|
1067
1075
|
forEach: createForEach(true, true)
|
|
1068
1076
|
};
|
|
1069
|
-
const iteratorMethods = [
|
|
1077
|
+
const iteratorMethods = [
|
|
1078
|
+
"keys",
|
|
1079
|
+
"values",
|
|
1080
|
+
"entries",
|
|
1081
|
+
Symbol.iterator
|
|
1082
|
+
];
|
|
1070
1083
|
iteratorMethods.forEach((method) => {
|
|
1071
|
-
mutableInstrumentations2[method] = createIterableMethod(
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
false
|
|
1075
|
-
);
|
|
1076
|
-
readonlyInstrumentations2[method] = createIterableMethod(
|
|
1077
|
-
method,
|
|
1078
|
-
true,
|
|
1079
|
-
false
|
|
1080
|
-
);
|
|
1081
|
-
shallowInstrumentations2[method] = createIterableMethod(
|
|
1082
|
-
method,
|
|
1083
|
-
false,
|
|
1084
|
-
true
|
|
1085
|
-
);
|
|
1084
|
+
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
1085
|
+
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1086
|
+
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1086
1087
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1087
1088
|
method,
|
|
1088
1089
|
true,
|
|
@@ -1227,7 +1228,7 @@ function isShallow(value) {
|
|
|
1227
1228
|
return !!(value && value["__v_isShallow"]);
|
|
1228
1229
|
}
|
|
1229
1230
|
function isProxy(value) {
|
|
1230
|
-
return
|
|
1231
|
+
return value ? !!value["__v_raw"] : false;
|
|
1231
1232
|
}
|
|
1232
1233
|
function toRaw(observed) {
|
|
1233
1234
|
const raw = observed && observed["__v_raw"];
|
|
@@ -1548,11 +1549,13 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
1548
1549
|
}
|
|
1549
1550
|
return res;
|
|
1550
1551
|
}
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1552
|
+
if (isArray(fn)) {
|
|
1553
|
+
const values = [];
|
|
1554
|
+
for (let i = 0; i < fn.length; i++) {
|
|
1555
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1556
|
+
}
|
|
1557
|
+
return values;
|
|
1554
1558
|
}
|
|
1555
|
-
return values;
|
|
1556
1559
|
}
|
|
1557
1560
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1558
1561
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1573,12 +1576,14 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
1573
1576
|
}
|
|
1574
1577
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1575
1578
|
if (appErrorHandler) {
|
|
1579
|
+
pauseTracking();
|
|
1576
1580
|
callWithErrorHandling(
|
|
1577
1581
|
appErrorHandler,
|
|
1578
1582
|
null,
|
|
1579
1583
|
10,
|
|
1580
1584
|
[err, exposedInstance, errorInfo]
|
|
1581
1585
|
);
|
|
1586
|
+
resetTracking();
|
|
1582
1587
|
return;
|
|
1583
1588
|
}
|
|
1584
1589
|
}
|
|
@@ -2382,7 +2387,7 @@ const SuspenseImpl = {
|
|
|
2382
2387
|
rendererInternals
|
|
2383
2388
|
);
|
|
2384
2389
|
} else {
|
|
2385
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2390
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
2386
2391
|
n2.suspense = n1.suspense;
|
|
2387
2392
|
n2.suspense.vnode = n2;
|
|
2388
2393
|
n2.el = n1.el;
|
|
@@ -3844,7 +3849,7 @@ const KeepAliveImpl = {
|
|
|
3844
3849
|
return () => {
|
|
3845
3850
|
pendingCacheKey = null;
|
|
3846
3851
|
if (!slots.default) {
|
|
3847
|
-
return null;
|
|
3852
|
+
return current = null;
|
|
3848
3853
|
}
|
|
3849
3854
|
const children = slots.default();
|
|
3850
3855
|
const rawVNode = children[0];
|
|
@@ -4554,47 +4559,68 @@ function installCompatInstanceProperties(map) {
|
|
|
4554
4559
|
$once: (i) => once.bind(null, i),
|
|
4555
4560
|
$off: (i) => off.bind(null, i),
|
|
4556
4561
|
$children: getCompatChildren,
|
|
4557
|
-
$listeners: getCompatListeners
|
|
4562
|
+
$listeners: getCompatListeners,
|
|
4563
|
+
// inject additional properties into $options for compat
|
|
4564
|
+
// e.g. vuex needs this.$options.parent
|
|
4565
|
+
$options: (i) => {
|
|
4566
|
+
if (!isCompatEnabled$1("PRIVATE_APIS", i)) {
|
|
4567
|
+
return resolveMergedOptions(i);
|
|
4568
|
+
}
|
|
4569
|
+
if (i.resolvedOptions) {
|
|
4570
|
+
return i.resolvedOptions;
|
|
4571
|
+
}
|
|
4572
|
+
const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
|
|
4573
|
+
Object.defineProperties(res, {
|
|
4574
|
+
parent: {
|
|
4575
|
+
get() {
|
|
4576
|
+
return i.proxy.$parent;
|
|
4577
|
+
}
|
|
4578
|
+
},
|
|
4579
|
+
propsData: {
|
|
4580
|
+
get() {
|
|
4581
|
+
return i.vnode.props;
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
});
|
|
4585
|
+
return res;
|
|
4586
|
+
}
|
|
4558
4587
|
});
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
_d: () => legacyBindDynamicKeys,
|
|
4596
|
-
_p: () => legacyPrependModifier
|
|
4597
|
-
});
|
|
4588
|
+
const privateAPIs = {
|
|
4589
|
+
// needed by many libs / render fns
|
|
4590
|
+
$vnode: (i) => i.vnode,
|
|
4591
|
+
// some private properties that are likely accessed...
|
|
4592
|
+
_self: (i) => i.proxy,
|
|
4593
|
+
_uid: (i) => i.uid,
|
|
4594
|
+
_data: (i) => i.data,
|
|
4595
|
+
_isMounted: (i) => i.isMounted,
|
|
4596
|
+
_isDestroyed: (i) => i.isUnmounted,
|
|
4597
|
+
// v2 render helpers
|
|
4598
|
+
$createElement: () => compatH,
|
|
4599
|
+
_c: () => compatH,
|
|
4600
|
+
_o: () => legacyMarkOnce,
|
|
4601
|
+
_n: () => looseToNumber,
|
|
4602
|
+
_s: () => toDisplayString,
|
|
4603
|
+
_l: () => renderList,
|
|
4604
|
+
_t: (i) => legacyRenderSlot.bind(null, i),
|
|
4605
|
+
_q: () => looseEqual,
|
|
4606
|
+
_i: () => looseIndexOf,
|
|
4607
|
+
_m: (i) => legacyRenderStatic.bind(null, i),
|
|
4608
|
+
_f: () => resolveFilter$1,
|
|
4609
|
+
_k: (i) => legacyCheckKeyCodes.bind(null, i),
|
|
4610
|
+
_b: () => legacyBindObjectProps,
|
|
4611
|
+
_v: () => createTextVNode,
|
|
4612
|
+
_e: () => createCommentVNode,
|
|
4613
|
+
_u: () => legacyresolveScopedSlots,
|
|
4614
|
+
_g: () => legacyBindObjectListeners,
|
|
4615
|
+
_d: () => legacyBindDynamicKeys,
|
|
4616
|
+
_p: () => legacyPrependModifier
|
|
4617
|
+
};
|
|
4618
|
+
for (const key in privateAPIs) {
|
|
4619
|
+
map[key] = (i) => {
|
|
4620
|
+
if (isCompatEnabled$1("PRIVATE_APIS", i)) {
|
|
4621
|
+
return privateAPIs[key](i);
|
|
4622
|
+
}
|
|
4623
|
+
};
|
|
4598
4624
|
}
|
|
4599
4625
|
}
|
|
4600
4626
|
|
|
@@ -4634,6 +4660,9 @@ const publicPropertiesMap = (
|
|
|
4634
4660
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
4635
4661
|
const PublicInstanceProxyHandlers = {
|
|
4636
4662
|
get({ _: instance }, key) {
|
|
4663
|
+
if (key === "__v_skip") {
|
|
4664
|
+
return true;
|
|
4665
|
+
}
|
|
4637
4666
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
4638
4667
|
let normalizedProps;
|
|
4639
4668
|
if (key[0] !== "$") {
|
|
@@ -5246,7 +5275,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5246
5275
|
return vm;
|
|
5247
5276
|
}
|
|
5248
5277
|
}
|
|
5249
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5278
|
+
Vue.version = `2.6.14-compat:${"3.4.22"}`;
|
|
5250
5279
|
Vue.config = singletonApp.config;
|
|
5251
5280
|
Vue.use = (p, ...options) => {
|
|
5252
5281
|
if (p && isFunction(p.install)) {
|
|
@@ -5432,14 +5461,13 @@ function applySingletonPrototype(app, Ctor) {
|
|
|
5432
5461
|
if (enabled) {
|
|
5433
5462
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
5434
5463
|
}
|
|
5435
|
-
const
|
|
5436
|
-
for (const key in descriptors) {
|
|
5464
|
+
for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
|
|
5437
5465
|
if (key !== "constructor") {
|
|
5438
5466
|
if (enabled) {
|
|
5439
5467
|
Object.defineProperty(
|
|
5440
5468
|
app.config.globalProperties,
|
|
5441
5469
|
key,
|
|
5442
|
-
|
|
5470
|
+
Object.getOwnPropertyDescriptor(Ctor.prototype, key)
|
|
5443
5471
|
);
|
|
5444
5472
|
}
|
|
5445
5473
|
}
|
|
@@ -5774,10 +5802,10 @@ function shouldSkipAttr(key, instance) {
|
|
|
5774
5802
|
return false;
|
|
5775
5803
|
}
|
|
5776
5804
|
|
|
5805
|
+
const attrsProto = {};
|
|
5777
5806
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5778
5807
|
const props = {};
|
|
5779
|
-
const attrs =
|
|
5780
|
-
def(attrs, InternalObjectKey, 1);
|
|
5808
|
+
const attrs = Object.create(attrsProto);
|
|
5781
5809
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5782
5810
|
setFullProps(instance, rawProps, props, attrs);
|
|
5783
5811
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -5889,7 +5917,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5889
5917
|
}
|
|
5890
5918
|
}
|
|
5891
5919
|
if (hasAttrsChanged) {
|
|
5892
|
-
trigger(instance, "set", "
|
|
5920
|
+
trigger(instance.attrs, "set", "");
|
|
5893
5921
|
}
|
|
5894
5922
|
}
|
|
5895
5923
|
function setFullProps(instance, rawProps, props, attrs) {
|
|
@@ -6119,7 +6147,7 @@ const initSlots = (instance, children) => {
|
|
|
6119
6147
|
const type = children._;
|
|
6120
6148
|
if (type) {
|
|
6121
6149
|
instance.slots = toRaw(children);
|
|
6122
|
-
def(
|
|
6150
|
+
def(instance.slots, "_", type);
|
|
6123
6151
|
} else {
|
|
6124
6152
|
normalizeObjectSlots(
|
|
6125
6153
|
children,
|
|
@@ -6131,7 +6159,6 @@ const initSlots = (instance, children) => {
|
|
|
6131
6159
|
normalizeVNodeSlots(instance, children);
|
|
6132
6160
|
}
|
|
6133
6161
|
}
|
|
6134
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
6135
6162
|
};
|
|
6136
6163
|
const updateSlots = (instance, children, optimized) => {
|
|
6137
6164
|
const { vnode, slots } = instance;
|
|
@@ -6287,6 +6314,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6287
6314
|
}
|
|
6288
6315
|
};
|
|
6289
6316
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
6317
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
6290
6318
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
6291
6319
|
const onMismatch = () => handleMismatch(
|
|
6292
6320
|
node,
|
|
@@ -8429,7 +8457,6 @@ function isSameVNodeType(n1, n2) {
|
|
|
8429
8457
|
}
|
|
8430
8458
|
function transformVNodeArgs(transformer) {
|
|
8431
8459
|
}
|
|
8432
|
-
const InternalObjectKey = `__vInternal`;
|
|
8433
8460
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8434
8461
|
const normalizeRef = ({
|
|
8435
8462
|
ref,
|
|
@@ -8554,7 +8581,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8554
8581
|
function guardReactiveProps(props) {
|
|
8555
8582
|
if (!props)
|
|
8556
8583
|
return null;
|
|
8557
|
-
return isProxy(props) ||
|
|
8584
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
8558
8585
|
}
|
|
8559
8586
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8560
8587
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -8655,7 +8682,7 @@ function normalizeChildren(vnode, children) {
|
|
|
8655
8682
|
} else {
|
|
8656
8683
|
type = 32;
|
|
8657
8684
|
const slotFlag = children._;
|
|
8658
|
-
if (!slotFlag
|
|
8685
|
+
if (!slotFlag) {
|
|
8659
8686
|
children._ctx = currentRenderingInstance;
|
|
8660
8687
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8661
8688
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -8860,7 +8887,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
8860
8887
|
function setupStatefulComponent(instance, isSSR) {
|
|
8861
8888
|
const Component = instance.type;
|
|
8862
8889
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
8863
|
-
instance.proxy =
|
|
8890
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
8864
8891
|
const { setup } = Component;
|
|
8865
8892
|
if (setup) {
|
|
8866
8893
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
@@ -8964,26 +8991,19 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8964
8991
|
}
|
|
8965
8992
|
}
|
|
8966
8993
|
}
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
return target[key];
|
|
8974
|
-
}
|
|
8975
|
-
}
|
|
8976
|
-
));
|
|
8977
|
-
}
|
|
8994
|
+
const attrsProxyHandlers = {
|
|
8995
|
+
get(target, key) {
|
|
8996
|
+
track(target, "get", "");
|
|
8997
|
+
return target[key];
|
|
8998
|
+
}
|
|
8999
|
+
};
|
|
8978
9000
|
function createSetupContext(instance) {
|
|
8979
9001
|
const expose = (exposed) => {
|
|
8980
9002
|
instance.exposed = exposed || {};
|
|
8981
9003
|
};
|
|
8982
9004
|
{
|
|
8983
9005
|
return {
|
|
8984
|
-
|
|
8985
|
-
return getAttrsProxy(instance);
|
|
8986
|
-
},
|
|
9006
|
+
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
8987
9007
|
slots: instance.slots,
|
|
8988
9008
|
emit: instance.emit,
|
|
8989
9009
|
expose
|
|
@@ -9115,7 +9135,7 @@ function isMemoSame(cached, memo) {
|
|
|
9115
9135
|
return true;
|
|
9116
9136
|
}
|
|
9117
9137
|
|
|
9118
|
-
const version = "3.4.
|
|
9138
|
+
const version = "3.4.22";
|
|
9119
9139
|
const warn$1 = NOOP;
|
|
9120
9140
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9121
9141
|
const devtools = void 0;
|
|
@@ -9728,15 +9748,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
9728
9748
|
const tag = el.tagName;
|
|
9729
9749
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
9730
9750
|
!tag.includes("-")) {
|
|
9731
|
-
el._value = value;
|
|
9732
9751
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
9733
9752
|
const newValue = value == null ? "" : value;
|
|
9734
|
-
if (oldValue !== newValue) {
|
|
9753
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
9735
9754
|
el.value = newValue;
|
|
9736
9755
|
}
|
|
9737
9756
|
if (value == null) {
|
|
9738
9757
|
el.removeAttribute(key);
|
|
9739
9758
|
}
|
|
9759
|
+
el._value = value;
|
|
9740
9760
|
return;
|
|
9741
9761
|
}
|
|
9742
9762
|
let needRemove = false;
|
|
@@ -9785,7 +9805,10 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
9785
9805
|
} else {
|
|
9786
9806
|
const [name, options] = parseName(rawName);
|
|
9787
9807
|
if (nextValue) {
|
|
9788
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
9808
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
9809
|
+
nextValue,
|
|
9810
|
+
instance
|
|
9811
|
+
);
|
|
9789
9812
|
addEventListener(el, name, invoker, options);
|
|
9790
9813
|
} else if (existingInvoker) {
|
|
9791
9814
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -9835,7 +9858,9 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
9835
9858
|
originalStop.call(e);
|
|
9836
9859
|
e._stopped = true;
|
|
9837
9860
|
};
|
|
9838
|
-
return value.map(
|
|
9861
|
+
return value.map(
|
|
9862
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
9863
|
+
);
|
|
9839
9864
|
} else {
|
|
9840
9865
|
return value;
|
|
9841
9866
|
}
|
|
@@ -10031,7 +10056,7 @@ class VueElement extends BaseClass {
|
|
|
10031
10056
|
}
|
|
10032
10057
|
}
|
|
10033
10058
|
_setAttr(key) {
|
|
10034
|
-
let value = this.getAttribute(key);
|
|
10059
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
10035
10060
|
const camelKey = camelize(key);
|
|
10036
10061
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
10037
10062
|
value = toNumber(value);
|
|
@@ -10186,7 +10211,28 @@ const TransitionGroupImpl = {
|
|
|
10186
10211
|
)) {
|
|
10187
10212
|
tag = "span";
|
|
10188
10213
|
}
|
|
10189
|
-
prevChildren =
|
|
10214
|
+
prevChildren = [];
|
|
10215
|
+
if (children) {
|
|
10216
|
+
for (let i = 0; i < children.length; i++) {
|
|
10217
|
+
const child = children[i];
|
|
10218
|
+
if (child.el && child.el instanceof Element) {
|
|
10219
|
+
prevChildren.push(child);
|
|
10220
|
+
setTransitionHooks(
|
|
10221
|
+
child,
|
|
10222
|
+
resolveTransitionHooks(
|
|
10223
|
+
child,
|
|
10224
|
+
cssTransitionProps,
|
|
10225
|
+
state,
|
|
10226
|
+
instance
|
|
10227
|
+
)
|
|
10228
|
+
);
|
|
10229
|
+
positionMap.set(
|
|
10230
|
+
child,
|
|
10231
|
+
child.el.getBoundingClientRect()
|
|
10232
|
+
);
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
}
|
|
10190
10236
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
10191
10237
|
for (let i = 0; i < children.length; i++) {
|
|
10192
10238
|
const child = children[i];
|
|
@@ -10197,16 +10243,6 @@ const TransitionGroupImpl = {
|
|
|
10197
10243
|
);
|
|
10198
10244
|
}
|
|
10199
10245
|
}
|
|
10200
|
-
if (prevChildren) {
|
|
10201
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
10202
|
-
const child = prevChildren[i];
|
|
10203
|
-
setTransitionHooks(
|
|
10204
|
-
child,
|
|
10205
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
10206
|
-
);
|
|
10207
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
10208
|
-
}
|
|
10209
|
-
}
|
|
10210
10246
|
return createVNode(tag, null, children);
|
|
10211
10247
|
};
|
|
10212
10248
|
}
|
|
@@ -10308,7 +10344,7 @@ const vModelText = {
|
|
|
10308
10344
|
el[assignKey] = getModelAssigner(vnode);
|
|
10309
10345
|
if (el.composing)
|
|
10310
10346
|
return;
|
|
10311
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10347
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
10312
10348
|
const newValue = value == null ? "" : value;
|
|
10313
10349
|
if (elValue === newValue) {
|
|
10314
10350
|
return;
|
|
@@ -10411,14 +10447,14 @@ const vModelSelect = {
|
|
|
10411
10447
|
// set value in mounted & updated because <select> relies on its children
|
|
10412
10448
|
// <option>s.
|
|
10413
10449
|
mounted(el, { value, modifiers: { number } }) {
|
|
10414
|
-
setSelected(el, value
|
|
10450
|
+
setSelected(el, value);
|
|
10415
10451
|
},
|
|
10416
10452
|
beforeUpdate(el, _binding, vnode) {
|
|
10417
10453
|
el[assignKey] = getModelAssigner(vnode);
|
|
10418
10454
|
},
|
|
10419
10455
|
updated(el, { value, modifiers: { number } }) {
|
|
10420
10456
|
if (!el._assigning) {
|
|
10421
|
-
setSelected(el, value
|
|
10457
|
+
setSelected(el, value);
|
|
10422
10458
|
}
|
|
10423
10459
|
}
|
|
10424
10460
|
};
|
|
@@ -10435,9 +10471,7 @@ function setSelected(el, value, number) {
|
|
|
10435
10471
|
if (isArrayValue) {
|
|
10436
10472
|
const optionType = typeof optionValue;
|
|
10437
10473
|
if (optionType === "string" || optionType === "number") {
|
|
10438
|
-
option.selected = value.
|
|
10439
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
10440
|
-
);
|
|
10474
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10441
10475
|
} else {
|
|
10442
10476
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10443
10477
|
}
|
|
@@ -13016,7 +13050,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13016
13050
|
if (isImplied) {
|
|
13017
13051
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
13018
13052
|
} else {
|
|
13019
|
-
setLocEnd(el.loc, end + 1);
|
|
13053
|
+
setLocEnd(el.loc, lookAhead(end, 62) + 1);
|
|
13020
13054
|
}
|
|
13021
13055
|
if (tokenizer.inSFCRoot) {
|
|
13022
13056
|
if (el.children.length) {
|
|
@@ -13081,6 +13115,12 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13081
13115
|
}
|
|
13082
13116
|
}
|
|
13083
13117
|
}
|
|
13118
|
+
function lookAhead(index, c) {
|
|
13119
|
+
let i = index;
|
|
13120
|
+
while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
|
|
13121
|
+
i++;
|
|
13122
|
+
return i;
|
|
13123
|
+
}
|
|
13084
13124
|
function backTrack(index, c) {
|
|
13085
13125
|
let i = index;
|
|
13086
13126
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
|
@@ -13956,7 +13996,6 @@ function createCodegenContext(ast, {
|
|
|
13956
13996
|
generatedLine: context.line,
|
|
13957
13997
|
generatedColumn: context.column - 1,
|
|
13958
13998
|
source: filename,
|
|
13959
|
-
// @ts-expect-error it is possible to be null
|
|
13960
13999
|
name
|
|
13961
14000
|
});
|
|
13962
14001
|
}
|
|
@@ -15680,13 +15719,30 @@ const transformElement = (node, context) => {
|
|
|
15680
15719
|
function resolveComponentType(node, context, ssr = false) {
|
|
15681
15720
|
let { tag } = node;
|
|
15682
15721
|
const isExplicitDynamic = isComponentTag(tag);
|
|
15683
|
-
const isProp = findProp(
|
|
15722
|
+
const isProp = findProp(
|
|
15723
|
+
node,
|
|
15724
|
+
"is",
|
|
15725
|
+
false,
|
|
15726
|
+
true
|
|
15727
|
+
/* allow empty */
|
|
15728
|
+
);
|
|
15684
15729
|
if (isProp) {
|
|
15685
15730
|
if (isExplicitDynamic || isCompatEnabled(
|
|
15686
15731
|
"COMPILER_IS_ON_ELEMENT",
|
|
15687
15732
|
context
|
|
15688
15733
|
)) {
|
|
15689
|
-
|
|
15734
|
+
let exp;
|
|
15735
|
+
if (isProp.type === 6) {
|
|
15736
|
+
exp = isProp.value && createSimpleExpression(isProp.value.content, true);
|
|
15737
|
+
} else {
|
|
15738
|
+
exp = isProp.exp;
|
|
15739
|
+
if (!exp) {
|
|
15740
|
+
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
15741
|
+
{
|
|
15742
|
+
exp = isProp.exp = processExpression(exp, context);
|
|
15743
|
+
}
|
|
15744
|
+
}
|
|
15745
|
+
}
|
|
15690
15746
|
if (exp) {
|
|
15691
15747
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
15692
15748
|
exp
|