@vue/compat 3.2.30 → 3.2.33
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/README.md +0 -1
- package/dist/vue.cjs.js +179 -79
- package/dist/vue.cjs.prod.js +141 -62
- package/dist/vue.esm-browser.js +179 -79
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +184 -81
- package/dist/vue.global.js +179 -79
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +179 -79
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +184 -81
- package/dist/vue.runtime.global.js +179 -79
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -430,8 +430,17 @@ var Vue = (function () {
|
|
|
430
430
|
let activeEffectScope;
|
|
431
431
|
class EffectScope {
|
|
432
432
|
constructor(detached = false) {
|
|
433
|
+
/**
|
|
434
|
+
* @internal
|
|
435
|
+
*/
|
|
433
436
|
this.active = true;
|
|
437
|
+
/**
|
|
438
|
+
* @internal
|
|
439
|
+
*/
|
|
434
440
|
this.effects = [];
|
|
441
|
+
/**
|
|
442
|
+
* @internal
|
|
443
|
+
*/
|
|
435
444
|
this.cleanups = [];
|
|
436
445
|
if (!detached && activeEffectScope) {
|
|
437
446
|
this.parent = activeEffectScope;
|
|
@@ -441,21 +450,30 @@ var Vue = (function () {
|
|
|
441
450
|
}
|
|
442
451
|
run(fn) {
|
|
443
452
|
if (this.active) {
|
|
453
|
+
const currentEffectScope = activeEffectScope;
|
|
444
454
|
try {
|
|
445
455
|
activeEffectScope = this;
|
|
446
456
|
return fn();
|
|
447
457
|
}
|
|
448
458
|
finally {
|
|
449
|
-
activeEffectScope =
|
|
459
|
+
activeEffectScope = currentEffectScope;
|
|
450
460
|
}
|
|
451
461
|
}
|
|
452
462
|
else {
|
|
453
463
|
warn(`cannot run an inactive effect scope.`);
|
|
454
464
|
}
|
|
455
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* This should only be called on non-detached scopes
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
456
470
|
on() {
|
|
457
471
|
activeEffectScope = this;
|
|
458
472
|
}
|
|
473
|
+
/**
|
|
474
|
+
* This should only be called on non-detached scopes
|
|
475
|
+
* @internal
|
|
476
|
+
*/
|
|
459
477
|
off() {
|
|
460
478
|
activeEffectScope = this.parent;
|
|
461
479
|
}
|
|
@@ -597,10 +615,17 @@ var Vue = (function () {
|
|
|
597
615
|
activeEffect = this.parent;
|
|
598
616
|
shouldTrack = lastShouldTrack;
|
|
599
617
|
this.parent = undefined;
|
|
618
|
+
if (this.deferStop) {
|
|
619
|
+
this.stop();
|
|
620
|
+
}
|
|
600
621
|
}
|
|
601
622
|
}
|
|
602
623
|
stop() {
|
|
603
|
-
|
|
624
|
+
// stopped while running itself - defer the cleanup
|
|
625
|
+
if (activeEffect === this) {
|
|
626
|
+
this.deferStop = true;
|
|
627
|
+
}
|
|
628
|
+
else if (this.active) {
|
|
604
629
|
cleanupEffect(this);
|
|
605
630
|
if (this.onStop) {
|
|
606
631
|
this.onStop();
|
|
@@ -679,9 +704,7 @@ var Vue = (function () {
|
|
|
679
704
|
dep.add(activeEffect);
|
|
680
705
|
activeEffect.deps.push(dep);
|
|
681
706
|
if (activeEffect.onTrack) {
|
|
682
|
-
activeEffect.onTrack(Object.assign({
|
|
683
|
-
effect: activeEffect
|
|
684
|
-
}, debuggerEventExtraInfo));
|
|
707
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
685
708
|
}
|
|
686
709
|
}
|
|
687
710
|
}
|
|
@@ -777,7 +800,9 @@ var Vue = (function () {
|
|
|
777
800
|
}
|
|
778
801
|
|
|
779
802
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
780
|
-
const builtInSymbols = new Set(
|
|
803
|
+
const builtInSymbols = new Set(
|
|
804
|
+
/*#__PURE__*/
|
|
805
|
+
Object.getOwnPropertyNames(Symbol)
|
|
781
806
|
.map(key => Symbol[key])
|
|
782
807
|
.filter(isSymbol));
|
|
783
808
|
const get = /*#__PURE__*/ createGetter();
|
|
@@ -929,13 +954,13 @@ var Vue = (function () {
|
|
|
929
954
|
get: readonlyGet,
|
|
930
955
|
set(target, key) {
|
|
931
956
|
{
|
|
932
|
-
|
|
957
|
+
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
933
958
|
}
|
|
934
959
|
return true;
|
|
935
960
|
},
|
|
936
961
|
deleteProperty(target, key) {
|
|
937
962
|
{
|
|
938
|
-
|
|
963
|
+
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
939
964
|
}
|
|
940
965
|
return true;
|
|
941
966
|
}
|
|
@@ -1763,7 +1788,7 @@ var Vue = (function () {
|
|
|
1763
1788
|
const pendingPostFlushCbs = [];
|
|
1764
1789
|
let activePostFlushCbs = null;
|
|
1765
1790
|
let postFlushIndex = 0;
|
|
1766
|
-
const resolvedPromise = Promise.resolve();
|
|
1791
|
+
const resolvedPromise = /*#__PURE__*/ Promise.resolve();
|
|
1767
1792
|
let currentFlushPromise = null;
|
|
1768
1793
|
let currentPreFlushParentJob = null;
|
|
1769
1794
|
const RECURSION_LIMIT = 100;
|
|
@@ -2697,6 +2722,8 @@ var Vue = (function () {
|
|
|
2697
2722
|
}
|
|
2698
2723
|
|
|
2699
2724
|
function emit$2(instance, event, ...rawArgs) {
|
|
2725
|
+
if (instance.isUnmounted)
|
|
2726
|
+
return;
|
|
2700
2727
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
2701
2728
|
{
|
|
2702
2729
|
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
@@ -3714,12 +3741,10 @@ var Vue = (function () {
|
|
|
3714
3741
|
return doWatch(effect, null, options);
|
|
3715
3742
|
}
|
|
3716
3743
|
function watchPostEffect(effect, options) {
|
|
3717
|
-
return doWatch(effect, null, (Object.assign(
|
|
3718
|
-
));
|
|
3744
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
3719
3745
|
}
|
|
3720
3746
|
function watchSyncEffect(effect, options) {
|
|
3721
|
-
return doWatch(effect, null, (Object.assign(
|
|
3722
|
-
));
|
|
3747
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
3723
3748
|
}
|
|
3724
3749
|
// initial value for watchers to trigger on undefined initial values
|
|
3725
3750
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -4018,10 +4043,22 @@ var Vue = (function () {
|
|
|
4018
4043
|
if (!children || !children.length) {
|
|
4019
4044
|
return;
|
|
4020
4045
|
}
|
|
4021
|
-
|
|
4046
|
+
let child = children[0];
|
|
4022
4047
|
if (children.length > 1) {
|
|
4023
|
-
|
|
4024
|
-
|
|
4048
|
+
let hasFound = false;
|
|
4049
|
+
// locate first non-comment child
|
|
4050
|
+
for (const c of children) {
|
|
4051
|
+
if (c.type !== Comment) {
|
|
4052
|
+
if (hasFound) {
|
|
4053
|
+
// warn more than one non-comment child
|
|
4054
|
+
warn$1('<transition> can only be used on a single element or component. ' +
|
|
4055
|
+
'Use <transition-group> for lists.');
|
|
4056
|
+
break;
|
|
4057
|
+
}
|
|
4058
|
+
child = c;
|
|
4059
|
+
hasFound = true;
|
|
4060
|
+
}
|
|
4061
|
+
}
|
|
4025
4062
|
}
|
|
4026
4063
|
// there's no need to track reactivity for these props so use the raw
|
|
4027
4064
|
// props for a bit better perf
|
|
@@ -4029,11 +4066,11 @@ var Vue = (function () {
|
|
|
4029
4066
|
const { mode } = rawProps;
|
|
4030
4067
|
// check mode
|
|
4031
4068
|
if (mode &&
|
|
4032
|
-
mode !== 'in-out' &&
|
|
4069
|
+
mode !== 'in-out' &&
|
|
4070
|
+
mode !== 'out-in' &&
|
|
4071
|
+
mode !== 'default') {
|
|
4033
4072
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4034
4073
|
}
|
|
4035
|
-
// at this point children has a guaranteed length of 1.
|
|
4036
|
-
const child = children[0];
|
|
4037
4074
|
if (state.isLeaving) {
|
|
4038
4075
|
return emptyPlaceholder(child);
|
|
4039
4076
|
}
|
|
@@ -4259,20 +4296,24 @@ var Vue = (function () {
|
|
|
4259
4296
|
vnode.transition = hooks;
|
|
4260
4297
|
}
|
|
4261
4298
|
}
|
|
4262
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
4299
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
4263
4300
|
let ret = [];
|
|
4264
4301
|
let keyedFragmentCount = 0;
|
|
4265
4302
|
for (let i = 0; i < children.length; i++) {
|
|
4266
|
-
|
|
4303
|
+
let child = children[i];
|
|
4304
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
4305
|
+
const key = parentKey == null
|
|
4306
|
+
? child.key
|
|
4307
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4267
4308
|
// handle fragment children case, e.g. v-for
|
|
4268
4309
|
if (child.type === Fragment) {
|
|
4269
4310
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4270
4311
|
keyedFragmentCount++;
|
|
4271
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
4312
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4272
4313
|
}
|
|
4273
4314
|
// comment placeholders should be skipped, e.g. v-if
|
|
4274
4315
|
else if (keepComment || child.type !== Comment) {
|
|
4275
|
-
ret.push(child);
|
|
4316
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
4276
4317
|
}
|
|
4277
4318
|
}
|
|
4278
4319
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -5330,6 +5371,10 @@ var Vue = (function () {
|
|
|
5330
5371
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5331
5372
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5332
5373
|
let key = propsToUpdate[i];
|
|
5374
|
+
// skip if the prop key is a declared emit event listener
|
|
5375
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5376
|
+
continue;
|
|
5377
|
+
}
|
|
5333
5378
|
// PROPS flag guarantees rawProps to be non-null
|
|
5334
5379
|
const value = rawProps[key];
|
|
5335
5380
|
if (options) {
|
|
@@ -5915,7 +5960,8 @@ var Vue = (function () {
|
|
|
5915
5960
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
5916
5961
|
return vnode;
|
|
5917
5962
|
}
|
|
5918
|
-
const instance = internalInstance
|
|
5963
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5964
|
+
internalInstance.proxy;
|
|
5919
5965
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5920
5966
|
for (let i = 0; i < directives.length; i++) {
|
|
5921
5967
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -6035,7 +6081,7 @@ var Vue = (function () {
|
|
|
6035
6081
|
return vm;
|
|
6036
6082
|
}
|
|
6037
6083
|
}
|
|
6038
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
6084
|
+
Vue.version = `2.6.14-compat:${"3.2.33"}`;
|
|
6039
6085
|
Vue.config = singletonApp.config;
|
|
6040
6086
|
Vue.use = (p, ...options) => {
|
|
6041
6087
|
if (p && isFunction(p.install)) {
|
|
@@ -6462,6 +6508,9 @@ var Vue = (function () {
|
|
|
6462
6508
|
let uid = 0;
|
|
6463
6509
|
function createAppAPI(render, hydrate) {
|
|
6464
6510
|
return function createApp(rootComponent, rootProps = null) {
|
|
6511
|
+
if (!isFunction(rootComponent)) {
|
|
6512
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
6513
|
+
}
|
|
6465
6514
|
if (rootProps != null && !isObject(rootProps)) {
|
|
6466
6515
|
warn$1(`root props passed to app.mount() must be an object.`);
|
|
6467
6516
|
rootProps = null;
|
|
@@ -6661,6 +6710,9 @@ var Vue = (function () {
|
|
|
6661
6710
|
if (!isArray(existing)) {
|
|
6662
6711
|
if (_isString) {
|
|
6663
6712
|
refs[ref] = [refValue];
|
|
6713
|
+
if (hasOwn(setupState, ref)) {
|
|
6714
|
+
setupState[ref] = refs[ref];
|
|
6715
|
+
}
|
|
6664
6716
|
}
|
|
6665
6717
|
else {
|
|
6666
6718
|
ref.value = [refValue];
|
|
@@ -6859,7 +6911,8 @@ var Vue = (function () {
|
|
|
6859
6911
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6860
6912
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6861
6913
|
// skip props & children if this is hoisted static nodes
|
|
6862
|
-
|
|
6914
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6915
|
+
{
|
|
6863
6916
|
if (dirs) {
|
|
6864
6917
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6865
6918
|
}
|
|
@@ -7032,7 +7085,7 @@ var Vue = (function () {
|
|
|
7032
7085
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
7033
7086
|
}
|
|
7034
7087
|
{
|
|
7035
|
-
devtoolsPerfStart(instance, type,
|
|
7088
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7036
7089
|
}
|
|
7037
7090
|
}
|
|
7038
7091
|
function endMeasure(instance, type) {
|
|
@@ -7045,7 +7098,7 @@ var Vue = (function () {
|
|
|
7045
7098
|
perf.clearMarks(endTag);
|
|
7046
7099
|
}
|
|
7047
7100
|
{
|
|
7048
|
-
devtoolsPerfEnd(instance, type,
|
|
7101
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7049
7102
|
}
|
|
7050
7103
|
}
|
|
7051
7104
|
function isSupported() {
|
|
@@ -8192,7 +8245,22 @@ var Vue = (function () {
|
|
|
8192
8245
|
const remove = vnode => {
|
|
8193
8246
|
const { type, el, anchor, transition } = vnode;
|
|
8194
8247
|
if (type === Fragment) {
|
|
8195
|
-
|
|
8248
|
+
if (vnode.patchFlag > 0 &&
|
|
8249
|
+
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
8250
|
+
transition &&
|
|
8251
|
+
!transition.persisted) {
|
|
8252
|
+
vnode.children.forEach(child => {
|
|
8253
|
+
if (child.type === Comment) {
|
|
8254
|
+
hostRemove(child.el);
|
|
8255
|
+
}
|
|
8256
|
+
else {
|
|
8257
|
+
remove(child);
|
|
8258
|
+
}
|
|
8259
|
+
});
|
|
8260
|
+
}
|
|
8261
|
+
else {
|
|
8262
|
+
removeFragment(el, anchor);
|
|
8263
|
+
}
|
|
8196
8264
|
return;
|
|
8197
8265
|
}
|
|
8198
8266
|
if (type === Static) {
|
|
@@ -9585,7 +9653,10 @@ var Vue = (function () {
|
|
|
9585
9653
|
// this is not a user-facing function, so the fallback is always generated by
|
|
9586
9654
|
// the compiler and guaranteed to be a function returning an array
|
|
9587
9655
|
fallback, noSlotted) {
|
|
9588
|
-
if (currentRenderingInstance.isCE
|
|
9656
|
+
if (currentRenderingInstance.isCE ||
|
|
9657
|
+
(currentRenderingInstance.parent &&
|
|
9658
|
+
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
9659
|
+
currentRenderingInstance.parent.isCE)) {
|
|
9589
9660
|
return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
|
|
9590
9661
|
}
|
|
9591
9662
|
let slot = slots[name];
|
|
@@ -9875,7 +9946,10 @@ var Vue = (function () {
|
|
|
9875
9946
|
return getExposeProxy(i) || i.proxy;
|
|
9876
9947
|
return getPublicInstance(i.parent);
|
|
9877
9948
|
};
|
|
9878
|
-
const publicPropertiesMap =
|
|
9949
|
+
const publicPropertiesMap =
|
|
9950
|
+
// Move PURE marker to new line to workaround compiler discarding it
|
|
9951
|
+
// due to type annotation
|
|
9952
|
+
/*#__PURE__*/ extend(Object.create(null), {
|
|
9879
9953
|
$: i => i,
|
|
9880
9954
|
$el: i => i.vnode.el,
|
|
9881
9955
|
$data: i => i.data,
|
|
@@ -9988,7 +10062,9 @@ var Vue = (function () {
|
|
|
9988
10062
|
}
|
|
9989
10063
|
else {
|
|
9990
10064
|
const val = globalProperties[key];
|
|
9991
|
-
return isFunction(val)
|
|
10065
|
+
return isFunction(val)
|
|
10066
|
+
? Object.assign(val.bind(instance.proxy), val)
|
|
10067
|
+
: val;
|
|
9992
10068
|
}
|
|
9993
10069
|
}
|
|
9994
10070
|
}
|
|
@@ -10013,9 +10089,11 @@ var Vue = (function () {
|
|
|
10013
10089
|
const { data, setupState, ctx } = instance;
|
|
10014
10090
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
10015
10091
|
setupState[key] = value;
|
|
10092
|
+
return true;
|
|
10016
10093
|
}
|
|
10017
10094
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
10018
10095
|
data[key] = value;
|
|
10096
|
+
return true;
|
|
10019
10097
|
}
|
|
10020
10098
|
else if (hasOwn(instance.props, key)) {
|
|
10021
10099
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -10049,6 +10127,16 @@ var Vue = (function () {
|
|
|
10049
10127
|
hasOwn(ctx, key) ||
|
|
10050
10128
|
hasOwn(publicPropertiesMap, key) ||
|
|
10051
10129
|
hasOwn(appContext.config.globalProperties, key));
|
|
10130
|
+
},
|
|
10131
|
+
defineProperty(target, key, descriptor) {
|
|
10132
|
+
if (descriptor.get != null) {
|
|
10133
|
+
// invalidate key cache of a getter based property #5417
|
|
10134
|
+
target._.accessCache[key] = 0;
|
|
10135
|
+
}
|
|
10136
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
10137
|
+
this.set(target, key, descriptor.value, null);
|
|
10138
|
+
}
|
|
10139
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
10052
10140
|
}
|
|
10053
10141
|
};
|
|
10054
10142
|
{
|
|
@@ -10251,6 +10339,7 @@ var Vue = (function () {
|
|
|
10251
10339
|
return setupResult;
|
|
10252
10340
|
}
|
|
10253
10341
|
function setupStatefulComponent(instance, isSSR) {
|
|
10342
|
+
var _a;
|
|
10254
10343
|
const Component = instance.type;
|
|
10255
10344
|
{
|
|
10256
10345
|
if (Component.name) {
|
|
@@ -10308,6 +10397,13 @@ var Vue = (function () {
|
|
|
10308
10397
|
// async setup returned Promise.
|
|
10309
10398
|
// bail here and wait for re-entry.
|
|
10310
10399
|
instance.asyncDep = setupResult;
|
|
10400
|
+
if (!instance.suspense) {
|
|
10401
|
+
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
10402
|
+
warn$1(`Component <${name}>: setup function returned a promise, but no ` +
|
|
10403
|
+
`<Suspense> boundary was found in the parent component tree. ` +
|
|
10404
|
+
`A component with async setup() must be nested in a <Suspense> ` +
|
|
10405
|
+
`in order to be rendered.`);
|
|
10406
|
+
}
|
|
10311
10407
|
}
|
|
10312
10408
|
}
|
|
10313
10409
|
else {
|
|
@@ -10934,7 +11030,7 @@ var Vue = (function () {
|
|
|
10934
11030
|
}
|
|
10935
11031
|
|
|
10936
11032
|
// Core API ------------------------------------------------------------------
|
|
10937
|
-
const version = "3.2.
|
|
11033
|
+
const version = "3.2.33";
|
|
10938
11034
|
/**
|
|
10939
11035
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10940
11036
|
* @internal
|
|
@@ -10958,7 +11054,7 @@ var Vue = (function () {
|
|
|
10958
11054
|
|
|
10959
11055
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
10960
11056
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10961
|
-
const templateContainer = doc && doc.createElement('template');
|
|
11057
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
10962
11058
|
const nodeOps = {
|
|
10963
11059
|
insert: (child, parent, anchor) => {
|
|
10964
11060
|
parent.insertBefore(child, anchor || null);
|
|
@@ -11109,6 +11205,8 @@ var Vue = (function () {
|
|
|
11109
11205
|
val.forEach(v => setStyle(style, name, v));
|
|
11110
11206
|
}
|
|
11111
11207
|
else {
|
|
11208
|
+
if (val == null)
|
|
11209
|
+
val = '';
|
|
11112
11210
|
if (name.startsWith('--')) {
|
|
11113
11211
|
// custom property definition
|
|
11114
11212
|
style.setProperty(name, val);
|
|
@@ -11230,41 +11328,39 @@ var Vue = (function () {
|
|
|
11230
11328
|
}
|
|
11231
11329
|
return;
|
|
11232
11330
|
}
|
|
11331
|
+
let needRemove = false;
|
|
11233
11332
|
if (value === '' || value == null) {
|
|
11234
11333
|
const type = typeof el[key];
|
|
11235
11334
|
if (type === 'boolean') {
|
|
11236
11335
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
11237
|
-
|
|
11238
|
-
return;
|
|
11336
|
+
value = includeBooleanAttr(value);
|
|
11239
11337
|
}
|
|
11240
11338
|
else if (value == null && type === 'string') {
|
|
11241
11339
|
// e.g. <div :id="null">
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
return;
|
|
11340
|
+
value = '';
|
|
11341
|
+
needRemove = true;
|
|
11245
11342
|
}
|
|
11246
11343
|
else if (type === 'number') {
|
|
11247
11344
|
// e.g. <img :width="null">
|
|
11248
11345
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
}
|
|
11252
|
-
catch (_a) { }
|
|
11253
|
-
el.removeAttribute(key);
|
|
11254
|
-
return;
|
|
11346
|
+
value = 0;
|
|
11347
|
+
needRemove = true;
|
|
11255
11348
|
}
|
|
11256
11349
|
}
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11350
|
+
else {
|
|
11351
|
+
if (value === false &&
|
|
11352
|
+
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11353
|
+
const type = typeof el[key];
|
|
11354
|
+
if (type === 'string' || type === 'number') {
|
|
11355
|
+
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11356
|
+
value = type === 'number' ? 0 : '';
|
|
11357
|
+
needRemove = true;
|
|
11358
|
+
}
|
|
11265
11359
|
}
|
|
11266
11360
|
}
|
|
11267
|
-
// some properties perform value validation and throw
|
|
11361
|
+
// some properties perform value validation and throw,
|
|
11362
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
11363
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
11268
11364
|
try {
|
|
11269
11365
|
el[key] = value;
|
|
11270
11366
|
}
|
|
@@ -11274,31 +11370,35 @@ var Vue = (function () {
|
|
|
11274
11370
|
`value ${value} is invalid.`, e);
|
|
11275
11371
|
}
|
|
11276
11372
|
}
|
|
11373
|
+
needRemove && el.removeAttribute(key);
|
|
11277
11374
|
}
|
|
11278
11375
|
|
|
11279
11376
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11377
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
11378
|
+
let _getNow = Date.now;
|
|
11379
|
+
let skipTimestampCheck = false;
|
|
11380
|
+
if (typeof window !== 'undefined') {
|
|
11381
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
11382
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
11383
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
11384
|
+
// same timestamp type when saving the flush timestamp.
|
|
11385
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
11386
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
11387
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
11388
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
11389
|
+
_getNow = () => performance.now();
|
|
11390
|
+
}
|
|
11391
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
11392
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
11393
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
11394
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
11395
|
+
}
|
|
11396
|
+
return [_getNow, skipTimestampCheck];
|
|
11397
|
+
})();
|
|
11298
11398
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
11299
11399
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
11300
11400
|
let cachedNow = 0;
|
|
11301
|
-
const p = Promise.resolve();
|
|
11401
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
11302
11402
|
const reset = () => {
|
|
11303
11403
|
cachedNow = 0;
|
|
11304
11404
|
};
|
|
@@ -11423,13 +11523,13 @@ var Vue = (function () {
|
|
|
11423
11523
|
}
|
|
11424
11524
|
return false;
|
|
11425
11525
|
}
|
|
11426
|
-
//
|
|
11427
|
-
//
|
|
11428
|
-
//
|
|
11429
|
-
//
|
|
11526
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
11527
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
11528
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
11529
|
+
// them as attributes.
|
|
11430
11530
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
11431
11531
|
// property is also enumerated string values.
|
|
11432
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
11532
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
11433
11533
|
return false;
|
|
11434
11534
|
}
|
|
11435
11535
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -12559,7 +12659,7 @@ var Vue = (function () {
|
|
|
12559
12659
|
el.style.display = value ? el._vod : 'none';
|
|
12560
12660
|
}
|
|
12561
12661
|
|
|
12562
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
12662
|
+
const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12563
12663
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
12564
12664
|
// in case the user only imports reactivity utilities from Vue.
|
|
12565
12665
|
let renderer;
|