vue 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/dist/vue.esm-browser.js +166 -69
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +166 -69
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +166 -69
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +166 -69
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +6 -6
package/dist/vue.global.js
CHANGED
|
@@ -430,8 +430,17 @@ var Vue = (function (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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;
|
|
@@ -2178,6 +2203,8 @@ var Vue = (function (exports) {
|
|
|
2178
2203
|
}
|
|
2179
2204
|
|
|
2180
2205
|
function emit$1(instance, event, ...rawArgs) {
|
|
2206
|
+
if (instance.isUnmounted)
|
|
2207
|
+
return;
|
|
2181
2208
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
2182
2209
|
{
|
|
2183
2210
|
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
@@ -3165,12 +3192,10 @@ var Vue = (function (exports) {
|
|
|
3165
3192
|
return doWatch(effect, null, options);
|
|
3166
3193
|
}
|
|
3167
3194
|
function watchPostEffect(effect, options) {
|
|
3168
|
-
return doWatch(effect, null, (Object.assign(
|
|
3169
|
-
));
|
|
3195
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
3170
3196
|
}
|
|
3171
3197
|
function watchSyncEffect(effect, options) {
|
|
3172
|
-
return doWatch(effect, null, (Object.assign(
|
|
3173
|
-
));
|
|
3198
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
3174
3199
|
}
|
|
3175
3200
|
// initial value for watchers to trigger on undefined initial values
|
|
3176
3201
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -3456,10 +3481,22 @@ var Vue = (function (exports) {
|
|
|
3456
3481
|
if (!children || !children.length) {
|
|
3457
3482
|
return;
|
|
3458
3483
|
}
|
|
3459
|
-
|
|
3484
|
+
let child = children[0];
|
|
3460
3485
|
if (children.length > 1) {
|
|
3461
|
-
|
|
3462
|
-
|
|
3486
|
+
let hasFound = false;
|
|
3487
|
+
// locate first non-comment child
|
|
3488
|
+
for (const c of children) {
|
|
3489
|
+
if (c.type !== Comment) {
|
|
3490
|
+
if (hasFound) {
|
|
3491
|
+
// warn more than one non-comment child
|
|
3492
|
+
warn$1('<transition> can only be used on a single element or component. ' +
|
|
3493
|
+
'Use <transition-group> for lists.');
|
|
3494
|
+
break;
|
|
3495
|
+
}
|
|
3496
|
+
child = c;
|
|
3497
|
+
hasFound = true;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3463
3500
|
}
|
|
3464
3501
|
// there's no need to track reactivity for these props so use the raw
|
|
3465
3502
|
// props for a bit better perf
|
|
@@ -3467,11 +3504,11 @@ var Vue = (function (exports) {
|
|
|
3467
3504
|
const { mode } = rawProps;
|
|
3468
3505
|
// check mode
|
|
3469
3506
|
if (mode &&
|
|
3470
|
-
mode !== 'in-out' &&
|
|
3507
|
+
mode !== 'in-out' &&
|
|
3508
|
+
mode !== 'out-in' &&
|
|
3509
|
+
mode !== 'default') {
|
|
3471
3510
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3472
3511
|
}
|
|
3473
|
-
// at this point children has a guaranteed length of 1.
|
|
3474
|
-
const child = children[0];
|
|
3475
3512
|
if (state.isLeaving) {
|
|
3476
3513
|
return emptyPlaceholder(child);
|
|
3477
3514
|
}
|
|
@@ -3694,20 +3731,24 @@ var Vue = (function (exports) {
|
|
|
3694
3731
|
vnode.transition = hooks;
|
|
3695
3732
|
}
|
|
3696
3733
|
}
|
|
3697
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
3734
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3698
3735
|
let ret = [];
|
|
3699
3736
|
let keyedFragmentCount = 0;
|
|
3700
3737
|
for (let i = 0; i < children.length; i++) {
|
|
3701
|
-
|
|
3738
|
+
let child = children[i];
|
|
3739
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
3740
|
+
const key = parentKey == null
|
|
3741
|
+
? child.key
|
|
3742
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
3702
3743
|
// handle fragment children case, e.g. v-for
|
|
3703
3744
|
if (child.type === Fragment) {
|
|
3704
3745
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
3705
3746
|
keyedFragmentCount++;
|
|
3706
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
3747
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
3707
3748
|
}
|
|
3708
3749
|
// comment placeholders should be skipped, e.g. v-if
|
|
3709
3750
|
else if (keepComment || child.type !== Comment) {
|
|
3710
|
-
ret.push(child);
|
|
3751
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
3711
3752
|
}
|
|
3712
3753
|
}
|
|
3713
3754
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -4673,6 +4714,10 @@ var Vue = (function (exports) {
|
|
|
4673
4714
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
4674
4715
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
4675
4716
|
let key = propsToUpdate[i];
|
|
4717
|
+
// skip if the prop key is a declared emit event listener
|
|
4718
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
4719
|
+
continue;
|
|
4720
|
+
}
|
|
4676
4721
|
// PROPS flag guarantees rawProps to be non-null
|
|
4677
4722
|
const value = rawProps[key];
|
|
4678
4723
|
if (options) {
|
|
@@ -5197,7 +5242,8 @@ var Vue = (function (exports) {
|
|
|
5197
5242
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
5198
5243
|
return vnode;
|
|
5199
5244
|
}
|
|
5200
|
-
const instance = internalInstance
|
|
5245
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5246
|
+
internalInstance.proxy;
|
|
5201
5247
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5202
5248
|
for (let i = 0; i < directives.length; i++) {
|
|
5203
5249
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -5269,6 +5315,9 @@ var Vue = (function (exports) {
|
|
|
5269
5315
|
let uid = 0;
|
|
5270
5316
|
function createAppAPI(render, hydrate) {
|
|
5271
5317
|
return function createApp(rootComponent, rootProps = null) {
|
|
5318
|
+
if (!isFunction(rootComponent)) {
|
|
5319
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
5320
|
+
}
|
|
5272
5321
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5273
5322
|
warn$1(`root props passed to app.mount() must be an object.`);
|
|
5274
5323
|
rootProps = null;
|
|
@@ -5465,6 +5514,9 @@ var Vue = (function (exports) {
|
|
|
5465
5514
|
if (!isArray(existing)) {
|
|
5466
5515
|
if (_isString) {
|
|
5467
5516
|
refs[ref] = [refValue];
|
|
5517
|
+
if (hasOwn(setupState, ref)) {
|
|
5518
|
+
setupState[ref] = refs[ref];
|
|
5519
|
+
}
|
|
5468
5520
|
}
|
|
5469
5521
|
else {
|
|
5470
5522
|
ref.value = [refValue];
|
|
@@ -5663,7 +5715,8 @@ var Vue = (function (exports) {
|
|
|
5663
5715
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
5664
5716
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
5665
5717
|
// skip props & children if this is hoisted static nodes
|
|
5666
|
-
|
|
5718
|
+
// #5405 in dev, always hydrate children for HMR
|
|
5719
|
+
{
|
|
5667
5720
|
if (dirs) {
|
|
5668
5721
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
5669
5722
|
}
|
|
@@ -5836,7 +5889,7 @@ var Vue = (function (exports) {
|
|
|
5836
5889
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
5837
5890
|
}
|
|
5838
5891
|
{
|
|
5839
|
-
devtoolsPerfStart(instance, type,
|
|
5892
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5840
5893
|
}
|
|
5841
5894
|
}
|
|
5842
5895
|
function endMeasure(instance, type) {
|
|
@@ -5849,7 +5902,7 @@ var Vue = (function (exports) {
|
|
|
5849
5902
|
perf.clearMarks(endTag);
|
|
5850
5903
|
}
|
|
5851
5904
|
{
|
|
5852
|
-
devtoolsPerfEnd(instance, type,
|
|
5905
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5853
5906
|
}
|
|
5854
5907
|
}
|
|
5855
5908
|
function isSupported() {
|
|
@@ -6977,7 +7030,22 @@ var Vue = (function (exports) {
|
|
|
6977
7030
|
const remove = vnode => {
|
|
6978
7031
|
const { type, el, anchor, transition } = vnode;
|
|
6979
7032
|
if (type === Fragment) {
|
|
6980
|
-
|
|
7033
|
+
if (vnode.patchFlag > 0 &&
|
|
7034
|
+
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
7035
|
+
transition &&
|
|
7036
|
+
!transition.persisted) {
|
|
7037
|
+
vnode.children.forEach(child => {
|
|
7038
|
+
if (child.type === Comment) {
|
|
7039
|
+
hostRemove(child.el);
|
|
7040
|
+
}
|
|
7041
|
+
else {
|
|
7042
|
+
remove(child);
|
|
7043
|
+
}
|
|
7044
|
+
});
|
|
7045
|
+
}
|
|
7046
|
+
else {
|
|
7047
|
+
removeFragment(el, anchor);
|
|
7048
|
+
}
|
|
6981
7049
|
return;
|
|
6982
7050
|
}
|
|
6983
7051
|
if (type === Static) {
|
|
@@ -7996,7 +8064,10 @@ var Vue = (function (exports) {
|
|
|
7996
8064
|
// this is not a user-facing function, so the fallback is always generated by
|
|
7997
8065
|
// the compiler and guaranteed to be a function returning an array
|
|
7998
8066
|
fallback, noSlotted) {
|
|
7999
|
-
if (currentRenderingInstance.isCE
|
|
8067
|
+
if (currentRenderingInstance.isCE ||
|
|
8068
|
+
(currentRenderingInstance.parent &&
|
|
8069
|
+
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
8070
|
+
currentRenderingInstance.parent.isCE)) {
|
|
8000
8071
|
return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
|
|
8001
8072
|
}
|
|
8002
8073
|
let slot = slots[name];
|
|
@@ -8069,7 +8140,10 @@ var Vue = (function (exports) {
|
|
|
8069
8140
|
return getExposeProxy(i) || i.proxy;
|
|
8070
8141
|
return getPublicInstance(i.parent);
|
|
8071
8142
|
};
|
|
8072
|
-
const publicPropertiesMap =
|
|
8143
|
+
const publicPropertiesMap =
|
|
8144
|
+
// Move PURE marker to new line to workaround compiler discarding it
|
|
8145
|
+
// due to type annotation
|
|
8146
|
+
/*#__PURE__*/ extend(Object.create(null), {
|
|
8073
8147
|
$: i => i,
|
|
8074
8148
|
$el: i => i.vnode.el,
|
|
8075
8149
|
$data: i => i.data,
|
|
@@ -8197,9 +8271,11 @@ var Vue = (function (exports) {
|
|
|
8197
8271
|
const { data, setupState, ctx } = instance;
|
|
8198
8272
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
8199
8273
|
setupState[key] = value;
|
|
8274
|
+
return true;
|
|
8200
8275
|
}
|
|
8201
8276
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
8202
8277
|
data[key] = value;
|
|
8278
|
+
return true;
|
|
8203
8279
|
}
|
|
8204
8280
|
else if (hasOwn(instance.props, key)) {
|
|
8205
8281
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -8233,6 +8309,16 @@ var Vue = (function (exports) {
|
|
|
8233
8309
|
hasOwn(ctx, key) ||
|
|
8234
8310
|
hasOwn(publicPropertiesMap, key) ||
|
|
8235
8311
|
hasOwn(appContext.config.globalProperties, key));
|
|
8312
|
+
},
|
|
8313
|
+
defineProperty(target, key, descriptor) {
|
|
8314
|
+
if (descriptor.get != null) {
|
|
8315
|
+
// invalidate key cache of a getter based property #5417
|
|
8316
|
+
target._.accessCache[key] = 0;
|
|
8317
|
+
}
|
|
8318
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
8319
|
+
this.set(target, key, descriptor.value, null);
|
|
8320
|
+
}
|
|
8321
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
8236
8322
|
}
|
|
8237
8323
|
};
|
|
8238
8324
|
{
|
|
@@ -8435,6 +8521,7 @@ var Vue = (function (exports) {
|
|
|
8435
8521
|
return setupResult;
|
|
8436
8522
|
}
|
|
8437
8523
|
function setupStatefulComponent(instance, isSSR) {
|
|
8524
|
+
var _a;
|
|
8438
8525
|
const Component = instance.type;
|
|
8439
8526
|
{
|
|
8440
8527
|
if (Component.name) {
|
|
@@ -8492,6 +8579,13 @@ var Vue = (function (exports) {
|
|
|
8492
8579
|
// async setup returned Promise.
|
|
8493
8580
|
// bail here and wait for re-entry.
|
|
8494
8581
|
instance.asyncDep = setupResult;
|
|
8582
|
+
if (!instance.suspense) {
|
|
8583
|
+
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
8584
|
+
warn$1(`Component <${name}>: setup function returned a promise, but no ` +
|
|
8585
|
+
`<Suspense> boundary was found in the parent component tree. ` +
|
|
8586
|
+
`A component with async setup() must be nested in a <Suspense> ` +
|
|
8587
|
+
`in order to be rendered.`);
|
|
8588
|
+
}
|
|
8495
8589
|
}
|
|
8496
8590
|
}
|
|
8497
8591
|
else {
|
|
@@ -9103,7 +9197,7 @@ var Vue = (function (exports) {
|
|
|
9103
9197
|
}
|
|
9104
9198
|
|
|
9105
9199
|
// Core API ------------------------------------------------------------------
|
|
9106
|
-
const version = "3.2.
|
|
9200
|
+
const version = "3.2.33";
|
|
9107
9201
|
/**
|
|
9108
9202
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9109
9203
|
* @internal
|
|
@@ -9120,7 +9214,7 @@ var Vue = (function (exports) {
|
|
|
9120
9214
|
|
|
9121
9215
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9122
9216
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
9123
|
-
const templateContainer = doc && doc.createElement('template');
|
|
9217
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
9124
9218
|
const nodeOps = {
|
|
9125
9219
|
insert: (child, parent, anchor) => {
|
|
9126
9220
|
parent.insertBefore(child, anchor || null);
|
|
@@ -9271,6 +9365,8 @@ var Vue = (function (exports) {
|
|
|
9271
9365
|
val.forEach(v => setStyle(style, name, v));
|
|
9272
9366
|
}
|
|
9273
9367
|
else {
|
|
9368
|
+
if (val == null)
|
|
9369
|
+
val = '';
|
|
9274
9370
|
if (name.startsWith('--')) {
|
|
9275
9371
|
// custom property definition
|
|
9276
9372
|
style.setProperty(name, val);
|
|
@@ -9365,31 +9461,28 @@ var Vue = (function (exports) {
|
|
|
9365
9461
|
}
|
|
9366
9462
|
return;
|
|
9367
9463
|
}
|
|
9464
|
+
let needRemove = false;
|
|
9368
9465
|
if (value === '' || value == null) {
|
|
9369
9466
|
const type = typeof el[key];
|
|
9370
9467
|
if (type === 'boolean') {
|
|
9371
9468
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
9372
|
-
|
|
9373
|
-
return;
|
|
9469
|
+
value = includeBooleanAttr(value);
|
|
9374
9470
|
}
|
|
9375
9471
|
else if (value == null && type === 'string') {
|
|
9376
9472
|
// e.g. <div :id="null">
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
return;
|
|
9473
|
+
value = '';
|
|
9474
|
+
needRemove = true;
|
|
9380
9475
|
}
|
|
9381
9476
|
else if (type === 'number') {
|
|
9382
9477
|
// e.g. <img :width="null">
|
|
9383
9478
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
}
|
|
9387
|
-
catch (_a) { }
|
|
9388
|
-
el.removeAttribute(key);
|
|
9389
|
-
return;
|
|
9479
|
+
value = 0;
|
|
9480
|
+
needRemove = true;
|
|
9390
9481
|
}
|
|
9391
9482
|
}
|
|
9392
|
-
// some properties perform value validation and throw
|
|
9483
|
+
// some properties perform value validation and throw,
|
|
9484
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
9485
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
9393
9486
|
try {
|
|
9394
9487
|
el[key] = value;
|
|
9395
9488
|
}
|
|
@@ -9399,31 +9492,35 @@ var Vue = (function (exports) {
|
|
|
9399
9492
|
`value ${value} is invalid.`, e);
|
|
9400
9493
|
}
|
|
9401
9494
|
}
|
|
9495
|
+
needRemove && el.removeAttribute(key);
|
|
9402
9496
|
}
|
|
9403
9497
|
|
|
9404
9498
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9499
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
9500
|
+
let _getNow = Date.now;
|
|
9501
|
+
let skipTimestampCheck = false;
|
|
9502
|
+
if (typeof window !== 'undefined') {
|
|
9503
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
9504
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
9505
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
9506
|
+
// same timestamp type when saving the flush timestamp.
|
|
9507
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
9508
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
9509
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
9510
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
9511
|
+
_getNow = () => performance.now();
|
|
9512
|
+
}
|
|
9513
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
9514
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
9515
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
9516
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
9517
|
+
}
|
|
9518
|
+
return [_getNow, skipTimestampCheck];
|
|
9519
|
+
})();
|
|
9423
9520
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
9424
9521
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
9425
9522
|
let cachedNow = 0;
|
|
9426
|
-
const p = Promise.resolve();
|
|
9523
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
9427
9524
|
const reset = () => {
|
|
9428
9525
|
cachedNow = 0;
|
|
9429
9526
|
};
|
|
@@ -9548,13 +9645,13 @@ var Vue = (function (exports) {
|
|
|
9548
9645
|
}
|
|
9549
9646
|
return false;
|
|
9550
9647
|
}
|
|
9551
|
-
//
|
|
9552
|
-
//
|
|
9553
|
-
//
|
|
9554
|
-
//
|
|
9648
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
9649
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
9650
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
9651
|
+
// them as attributes.
|
|
9555
9652
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
9556
9653
|
// property is also enumerated string values.
|
|
9557
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
9654
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
9558
9655
|
return false;
|
|
9559
9656
|
}
|
|
9560
9657
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -10609,7 +10706,7 @@ var Vue = (function (exports) {
|
|
|
10609
10706
|
el.style.display = value ? el._vod : 'none';
|
|
10610
10707
|
}
|
|
10611
10708
|
|
|
10612
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
10709
|
+
const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10613
10710
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
10614
10711
|
// in case the user only imports reactivity utilities from Vue.
|
|
10615
10712
|
let renderer;
|