@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
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
**/
|
|
@@ -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
|
}
|
|
@@ -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] !== "$") {
|
|
@@ -4673,7 +4702,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
4673
4702
|
let cssModule, globalProperties;
|
|
4674
4703
|
if (publicGetter) {
|
|
4675
4704
|
if (key === "$attrs") {
|
|
4676
|
-
track(instance, "get",
|
|
4705
|
+
track(instance.attrs, "get", "");
|
|
4677
4706
|
}
|
|
4678
4707
|
return publicGetter(instance);
|
|
4679
4708
|
} else if (
|
|
@@ -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.23"}`;
|
|
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,13 @@ function shouldSkipAttr(key, instance) {
|
|
|
5774
5802
|
return false;
|
|
5775
5803
|
}
|
|
5776
5804
|
|
|
5805
|
+
const internalObjectProto = /* @__PURE__ */ Object.create(null);
|
|
5806
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5807
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5808
|
+
|
|
5777
5809
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5778
5810
|
const props = {};
|
|
5779
|
-
const attrs =
|
|
5780
|
-
def(attrs, InternalObjectKey, 1);
|
|
5811
|
+
const attrs = createInternalObject();
|
|
5781
5812
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5782
5813
|
setFullProps(instance, rawProps, props, attrs);
|
|
5783
5814
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -5889,7 +5920,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5889
5920
|
}
|
|
5890
5921
|
}
|
|
5891
5922
|
if (hasAttrsChanged) {
|
|
5892
|
-
trigger(instance, "set", "
|
|
5923
|
+
trigger(instance.attrs, "set", "");
|
|
5893
5924
|
}
|
|
5894
5925
|
}
|
|
5895
5926
|
function setFullProps(instance, rawProps, props, attrs) {
|
|
@@ -6119,19 +6150,18 @@ const initSlots = (instance, children) => {
|
|
|
6119
6150
|
const type = children._;
|
|
6120
6151
|
if (type) {
|
|
6121
6152
|
instance.slots = toRaw(children);
|
|
6122
|
-
def(
|
|
6153
|
+
def(instance.slots, "_", type);
|
|
6123
6154
|
} else {
|
|
6124
6155
|
normalizeObjectSlots(
|
|
6125
6156
|
children,
|
|
6126
|
-
instance.slots =
|
|
6157
|
+
instance.slots = createInternalObject());
|
|
6127
6158
|
}
|
|
6128
6159
|
} else {
|
|
6129
|
-
instance.slots =
|
|
6160
|
+
instance.slots = createInternalObject();
|
|
6130
6161
|
if (children) {
|
|
6131
6162
|
normalizeVNodeSlots(instance, children);
|
|
6132
6163
|
}
|
|
6133
6164
|
}
|
|
6134
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
6135
6165
|
};
|
|
6136
6166
|
const updateSlots = (instance, children, optimized) => {
|
|
6137
6167
|
const { vnode, slots } = instance;
|
|
@@ -6287,6 +6317,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6287
6317
|
}
|
|
6288
6318
|
};
|
|
6289
6319
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
6320
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
6290
6321
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
6291
6322
|
const onMismatch = () => handleMismatch(
|
|
6292
6323
|
node,
|
|
@@ -8429,7 +8460,6 @@ function isSameVNodeType(n1, n2) {
|
|
|
8429
8460
|
}
|
|
8430
8461
|
function transformVNodeArgs(transformer) {
|
|
8431
8462
|
}
|
|
8432
|
-
const InternalObjectKey = `__vInternal`;
|
|
8433
8463
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8434
8464
|
const normalizeRef = ({
|
|
8435
8465
|
ref,
|
|
@@ -8554,7 +8584,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8554
8584
|
function guardReactiveProps(props) {
|
|
8555
8585
|
if (!props)
|
|
8556
8586
|
return null;
|
|
8557
|
-
return isProxy(props) ||
|
|
8587
|
+
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8558
8588
|
}
|
|
8559
8589
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8560
8590
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -8655,7 +8685,7 @@ function normalizeChildren(vnode, children) {
|
|
|
8655
8685
|
} else {
|
|
8656
8686
|
type = 32;
|
|
8657
8687
|
const slotFlag = children._;
|
|
8658
|
-
if (!slotFlag && !(
|
|
8688
|
+
if (!slotFlag && !isInternalObject(children)) {
|
|
8659
8689
|
children._ctx = currentRenderingInstance;
|
|
8660
8690
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8661
8691
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -8860,7 +8890,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
8860
8890
|
function setupStatefulComponent(instance, isSSR) {
|
|
8861
8891
|
const Component = instance.type;
|
|
8862
8892
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
8863
|
-
instance.proxy =
|
|
8893
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
8864
8894
|
const { setup } = Component;
|
|
8865
8895
|
if (setup) {
|
|
8866
8896
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
@@ -8964,26 +8994,19 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8964
8994
|
}
|
|
8965
8995
|
}
|
|
8966
8996
|
}
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
return target[key];
|
|
8974
|
-
}
|
|
8975
|
-
}
|
|
8976
|
-
));
|
|
8977
|
-
}
|
|
8997
|
+
const attrsProxyHandlers = {
|
|
8998
|
+
get(target, key) {
|
|
8999
|
+
track(target, "get", "");
|
|
9000
|
+
return target[key];
|
|
9001
|
+
}
|
|
9002
|
+
};
|
|
8978
9003
|
function createSetupContext(instance) {
|
|
8979
9004
|
const expose = (exposed) => {
|
|
8980
9005
|
instance.exposed = exposed || {};
|
|
8981
9006
|
};
|
|
8982
9007
|
{
|
|
8983
9008
|
return {
|
|
8984
|
-
|
|
8985
|
-
return getAttrsProxy(instance);
|
|
8986
|
-
},
|
|
9009
|
+
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
8987
9010
|
slots: instance.slots,
|
|
8988
9011
|
emit: instance.emit,
|
|
8989
9012
|
expose
|
|
@@ -9115,7 +9138,7 @@ function isMemoSame(cached, memo) {
|
|
|
9115
9138
|
return true;
|
|
9116
9139
|
}
|
|
9117
9140
|
|
|
9118
|
-
const version = "3.4.
|
|
9141
|
+
const version = "3.4.23";
|
|
9119
9142
|
const warn$1 = NOOP;
|
|
9120
9143
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9121
9144
|
const devtools = void 0;
|
|
@@ -9785,7 +9808,10 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
9785
9808
|
} else {
|
|
9786
9809
|
const [name, options] = parseName(rawName);
|
|
9787
9810
|
if (nextValue) {
|
|
9788
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
9811
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
9812
|
+
nextValue,
|
|
9813
|
+
instance
|
|
9814
|
+
);
|
|
9789
9815
|
addEventListener(el, name, invoker, options);
|
|
9790
9816
|
} else if (existingInvoker) {
|
|
9791
9817
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -9835,7 +9861,9 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
9835
9861
|
originalStop.call(e);
|
|
9836
9862
|
e._stopped = true;
|
|
9837
9863
|
};
|
|
9838
|
-
return value.map(
|
|
9864
|
+
return value.map(
|
|
9865
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
9866
|
+
);
|
|
9839
9867
|
} else {
|
|
9840
9868
|
return value;
|
|
9841
9869
|
}
|
|
@@ -10031,7 +10059,7 @@ class VueElement extends BaseClass {
|
|
|
10031
10059
|
}
|
|
10032
10060
|
}
|
|
10033
10061
|
_setAttr(key) {
|
|
10034
|
-
let value = this.getAttribute(key);
|
|
10062
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
10035
10063
|
const camelKey = camelize(key);
|
|
10036
10064
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
10037
10065
|
value = toNumber(value);
|
|
@@ -10186,7 +10214,28 @@ const TransitionGroupImpl = {
|
|
|
10186
10214
|
)) {
|
|
10187
10215
|
tag = "span";
|
|
10188
10216
|
}
|
|
10189
|
-
prevChildren =
|
|
10217
|
+
prevChildren = [];
|
|
10218
|
+
if (children) {
|
|
10219
|
+
for (let i = 0; i < children.length; i++) {
|
|
10220
|
+
const child = children[i];
|
|
10221
|
+
if (child.el && child.el instanceof Element) {
|
|
10222
|
+
prevChildren.push(child);
|
|
10223
|
+
setTransitionHooks(
|
|
10224
|
+
child,
|
|
10225
|
+
resolveTransitionHooks(
|
|
10226
|
+
child,
|
|
10227
|
+
cssTransitionProps,
|
|
10228
|
+
state,
|
|
10229
|
+
instance
|
|
10230
|
+
)
|
|
10231
|
+
);
|
|
10232
|
+
positionMap.set(
|
|
10233
|
+
child,
|
|
10234
|
+
child.el.getBoundingClientRect()
|
|
10235
|
+
);
|
|
10236
|
+
}
|
|
10237
|
+
}
|
|
10238
|
+
}
|
|
10190
10239
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
10191
10240
|
for (let i = 0; i < children.length; i++) {
|
|
10192
10241
|
const child = children[i];
|
|
@@ -10197,16 +10246,6 @@ const TransitionGroupImpl = {
|
|
|
10197
10246
|
);
|
|
10198
10247
|
}
|
|
10199
10248
|
}
|
|
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
10249
|
return createVNode(tag, null, children);
|
|
10211
10250
|
};
|
|
10212
10251
|
}
|
|
@@ -10308,7 +10347,7 @@ const vModelText = {
|
|
|
10308
10347
|
el[assignKey] = getModelAssigner(vnode);
|
|
10309
10348
|
if (el.composing)
|
|
10310
10349
|
return;
|
|
10311
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10350
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
10312
10351
|
const newValue = value == null ? "" : value;
|
|
10313
10352
|
if (elValue === newValue) {
|
|
10314
10353
|
return;
|
|
@@ -10411,14 +10450,14 @@ const vModelSelect = {
|
|
|
10411
10450
|
// set value in mounted & updated because <select> relies on its children
|
|
10412
10451
|
// <option>s.
|
|
10413
10452
|
mounted(el, { value, modifiers: { number } }) {
|
|
10414
|
-
setSelected(el, value
|
|
10453
|
+
setSelected(el, value);
|
|
10415
10454
|
},
|
|
10416
10455
|
beforeUpdate(el, _binding, vnode) {
|
|
10417
10456
|
el[assignKey] = getModelAssigner(vnode);
|
|
10418
10457
|
},
|
|
10419
10458
|
updated(el, { value, modifiers: { number } }) {
|
|
10420
10459
|
if (!el._assigning) {
|
|
10421
|
-
setSelected(el, value
|
|
10460
|
+
setSelected(el, value);
|
|
10422
10461
|
}
|
|
10423
10462
|
}
|
|
10424
10463
|
};
|
|
@@ -10435,9 +10474,7 @@ function setSelected(el, value, number) {
|
|
|
10435
10474
|
if (isArrayValue) {
|
|
10436
10475
|
const optionType = typeof optionValue;
|
|
10437
10476
|
if (optionType === "string" || optionType === "number") {
|
|
10438
|
-
option.selected = value.
|
|
10439
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
10440
|
-
);
|
|
10477
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10441
10478
|
} else {
|
|
10442
10479
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10443
10480
|
}
|
|
@@ -13016,7 +13053,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13016
13053
|
if (isImplied) {
|
|
13017
13054
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
13018
13055
|
} else {
|
|
13019
|
-
setLocEnd(el.loc, end + 1);
|
|
13056
|
+
setLocEnd(el.loc, lookAhead(end, 62) + 1);
|
|
13020
13057
|
}
|
|
13021
13058
|
if (tokenizer.inSFCRoot) {
|
|
13022
13059
|
if (el.children.length) {
|
|
@@ -13081,6 +13118,12 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13081
13118
|
}
|
|
13082
13119
|
}
|
|
13083
13120
|
}
|
|
13121
|
+
function lookAhead(index, c) {
|
|
13122
|
+
let i = index;
|
|
13123
|
+
while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
|
|
13124
|
+
i++;
|
|
13125
|
+
return i;
|
|
13126
|
+
}
|
|
13084
13127
|
function backTrack(index, c) {
|
|
13085
13128
|
let i = index;
|
|
13086
13129
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
|
@@ -13956,7 +13999,6 @@ function createCodegenContext(ast, {
|
|
|
13956
13999
|
generatedLine: context.line,
|
|
13957
14000
|
generatedColumn: context.column - 1,
|
|
13958
14001
|
source: filename,
|
|
13959
|
-
// @ts-expect-error it is possible to be null
|
|
13960
14002
|
name
|
|
13961
14003
|
});
|
|
13962
14004
|
}
|
|
@@ -15680,13 +15722,30 @@ const transformElement = (node, context) => {
|
|
|
15680
15722
|
function resolveComponentType(node, context, ssr = false) {
|
|
15681
15723
|
let { tag } = node;
|
|
15682
15724
|
const isExplicitDynamic = isComponentTag(tag);
|
|
15683
|
-
const isProp = findProp(
|
|
15725
|
+
const isProp = findProp(
|
|
15726
|
+
node,
|
|
15727
|
+
"is",
|
|
15728
|
+
false,
|
|
15729
|
+
true
|
|
15730
|
+
/* allow empty */
|
|
15731
|
+
);
|
|
15684
15732
|
if (isProp) {
|
|
15685
15733
|
if (isExplicitDynamic || isCompatEnabled(
|
|
15686
15734
|
"COMPILER_IS_ON_ELEMENT",
|
|
15687
15735
|
context
|
|
15688
15736
|
)) {
|
|
15689
|
-
|
|
15737
|
+
let exp;
|
|
15738
|
+
if (isProp.type === 6) {
|
|
15739
|
+
exp = isProp.value && createSimpleExpression(isProp.value.content, true);
|
|
15740
|
+
} else {
|
|
15741
|
+
exp = isProp.exp;
|
|
15742
|
+
if (!exp) {
|
|
15743
|
+
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
15744
|
+
{
|
|
15745
|
+
exp = isProp.exp = processExpression(exp, context);
|
|
15746
|
+
}
|
|
15747
|
+
}
|
|
15748
|
+
}
|
|
15690
15749
|
if (exp) {
|
|
15691
15750
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
15692
15751
|
exp
|