@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.esm-bundler.js
CHANGED
|
@@ -428,8 +428,17 @@ function warn(msg, ...args) {
|
|
|
428
428
|
let activeEffectScope;
|
|
429
429
|
class EffectScope {
|
|
430
430
|
constructor(detached = false) {
|
|
431
|
+
/**
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
431
434
|
this.active = true;
|
|
435
|
+
/**
|
|
436
|
+
* @internal
|
|
437
|
+
*/
|
|
432
438
|
this.effects = [];
|
|
439
|
+
/**
|
|
440
|
+
* @internal
|
|
441
|
+
*/
|
|
433
442
|
this.cleanups = [];
|
|
434
443
|
if (!detached && activeEffectScope) {
|
|
435
444
|
this.parent = activeEffectScope;
|
|
@@ -439,21 +448,30 @@ class EffectScope {
|
|
|
439
448
|
}
|
|
440
449
|
run(fn) {
|
|
441
450
|
if (this.active) {
|
|
451
|
+
const currentEffectScope = activeEffectScope;
|
|
442
452
|
try {
|
|
443
453
|
activeEffectScope = this;
|
|
444
454
|
return fn();
|
|
445
455
|
}
|
|
446
456
|
finally {
|
|
447
|
-
activeEffectScope =
|
|
457
|
+
activeEffectScope = currentEffectScope;
|
|
448
458
|
}
|
|
449
459
|
}
|
|
450
460
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
451
461
|
warn(`cannot run an inactive effect scope.`);
|
|
452
462
|
}
|
|
453
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* This should only be called on non-detached scopes
|
|
466
|
+
* @internal
|
|
467
|
+
*/
|
|
454
468
|
on() {
|
|
455
469
|
activeEffectScope = this;
|
|
456
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* This should only be called on non-detached scopes
|
|
473
|
+
* @internal
|
|
474
|
+
*/
|
|
457
475
|
off() {
|
|
458
476
|
activeEffectScope = this.parent;
|
|
459
477
|
}
|
|
@@ -595,10 +613,17 @@ class ReactiveEffect {
|
|
|
595
613
|
activeEffect = this.parent;
|
|
596
614
|
shouldTrack = lastShouldTrack;
|
|
597
615
|
this.parent = undefined;
|
|
616
|
+
if (this.deferStop) {
|
|
617
|
+
this.stop();
|
|
618
|
+
}
|
|
598
619
|
}
|
|
599
620
|
}
|
|
600
621
|
stop() {
|
|
601
|
-
|
|
622
|
+
// stopped while running itself - defer the cleanup
|
|
623
|
+
if (activeEffect === this) {
|
|
624
|
+
this.deferStop = true;
|
|
625
|
+
}
|
|
626
|
+
else if (this.active) {
|
|
602
627
|
cleanupEffect(this);
|
|
603
628
|
if (this.onStop) {
|
|
604
629
|
this.onStop();
|
|
@@ -678,9 +703,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
|
|
|
678
703
|
dep.add(activeEffect);
|
|
679
704
|
activeEffect.deps.push(dep);
|
|
680
705
|
if ((process.env.NODE_ENV !== 'production') && activeEffect.onTrack) {
|
|
681
|
-
activeEffect.onTrack(Object.assign({
|
|
682
|
-
effect: activeEffect
|
|
683
|
-
}, debuggerEventExtraInfo));
|
|
706
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
684
707
|
}
|
|
685
708
|
}
|
|
686
709
|
}
|
|
@@ -783,7 +806,9 @@ function triggerEffects(dep, debuggerEventExtraInfo) {
|
|
|
783
806
|
}
|
|
784
807
|
|
|
785
808
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
786
|
-
const builtInSymbols = new Set(
|
|
809
|
+
const builtInSymbols = new Set(
|
|
810
|
+
/*#__PURE__*/
|
|
811
|
+
Object.getOwnPropertyNames(Symbol)
|
|
787
812
|
.map(key => Symbol[key])
|
|
788
813
|
.filter(isSymbol));
|
|
789
814
|
const get = /*#__PURE__*/ createGetter();
|
|
@@ -935,13 +960,13 @@ const readonlyHandlers = {
|
|
|
935
960
|
get: readonlyGet,
|
|
936
961
|
set(target, key) {
|
|
937
962
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
938
|
-
|
|
963
|
+
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
939
964
|
}
|
|
940
965
|
return true;
|
|
941
966
|
},
|
|
942
967
|
deleteProperty(target, key) {
|
|
943
968
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
944
|
-
|
|
969
|
+
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
945
970
|
}
|
|
946
971
|
return true;
|
|
947
972
|
}
|
|
@@ -1781,7 +1806,7 @@ let preFlushIndex = 0;
|
|
|
1781
1806
|
const pendingPostFlushCbs = [];
|
|
1782
1807
|
let activePostFlushCbs = null;
|
|
1783
1808
|
let postFlushIndex = 0;
|
|
1784
|
-
const resolvedPromise = Promise.resolve();
|
|
1809
|
+
const resolvedPromise = /*#__PURE__*/ Promise.resolve();
|
|
1785
1810
|
let currentFlushPromise = null;
|
|
1786
1811
|
let currentPreFlushParentJob = null;
|
|
1787
1812
|
const RECURSION_LIMIT = 100;
|
|
@@ -2721,6 +2746,8 @@ function compatModelEmit(instance, event, args) {
|
|
|
2721
2746
|
}
|
|
2722
2747
|
|
|
2723
2748
|
function emit$2(instance, event, ...rawArgs) {
|
|
2749
|
+
if (instance.isUnmounted)
|
|
2750
|
+
return;
|
|
2724
2751
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
2725
2752
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
2726
2753
|
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
@@ -3740,13 +3767,11 @@ function watchEffect(effect, options) {
|
|
|
3740
3767
|
}
|
|
3741
3768
|
function watchPostEffect(effect, options) {
|
|
3742
3769
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
3743
|
-
? Object.assign(options
|
|
3744
|
-
: { flush: 'post' }));
|
|
3770
|
+
? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' }));
|
|
3745
3771
|
}
|
|
3746
3772
|
function watchSyncEffect(effect, options) {
|
|
3747
3773
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
3748
|
-
? Object.assign(options
|
|
3749
|
-
: { flush: 'sync' }));
|
|
3774
|
+
? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));
|
|
3750
3775
|
}
|
|
3751
3776
|
// initial value for watchers to trigger on undefined initial values
|
|
3752
3777
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -4062,10 +4087,24 @@ const BaseTransitionImpl = {
|
|
|
4062
4087
|
if (!children || !children.length) {
|
|
4063
4088
|
return;
|
|
4064
4089
|
}
|
|
4065
|
-
|
|
4066
|
-
if (
|
|
4067
|
-
|
|
4068
|
-
|
|
4090
|
+
let child = children[0];
|
|
4091
|
+
if (children.length > 1) {
|
|
4092
|
+
let hasFound = false;
|
|
4093
|
+
// locate first non-comment child
|
|
4094
|
+
for (const c of children) {
|
|
4095
|
+
if (c.type !== Comment) {
|
|
4096
|
+
if ((process.env.NODE_ENV !== 'production') && hasFound) {
|
|
4097
|
+
// warn more than one non-comment child
|
|
4098
|
+
warn$1('<transition> can only be used on a single element or component. ' +
|
|
4099
|
+
'Use <transition-group> for lists.');
|
|
4100
|
+
break;
|
|
4101
|
+
}
|
|
4102
|
+
child = c;
|
|
4103
|
+
hasFound = true;
|
|
4104
|
+
if (!(process.env.NODE_ENV !== 'production'))
|
|
4105
|
+
break;
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4069
4108
|
}
|
|
4070
4109
|
// there's no need to track reactivity for these props so use the raw
|
|
4071
4110
|
// props for a bit better perf
|
|
@@ -4074,11 +4113,11 @@ const BaseTransitionImpl = {
|
|
|
4074
4113
|
// check mode
|
|
4075
4114
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
4076
4115
|
mode &&
|
|
4077
|
-
mode !== 'in-out' &&
|
|
4116
|
+
mode !== 'in-out' &&
|
|
4117
|
+
mode !== 'out-in' &&
|
|
4118
|
+
mode !== 'default') {
|
|
4078
4119
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4079
4120
|
}
|
|
4080
|
-
// at this point children has a guaranteed length of 1.
|
|
4081
|
-
const child = children[0];
|
|
4082
4121
|
if (state.isLeaving) {
|
|
4083
4122
|
return emptyPlaceholder(child);
|
|
4084
4123
|
}
|
|
@@ -4304,20 +4343,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4304
4343
|
vnode.transition = hooks;
|
|
4305
4344
|
}
|
|
4306
4345
|
}
|
|
4307
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
4346
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
4308
4347
|
let ret = [];
|
|
4309
4348
|
let keyedFragmentCount = 0;
|
|
4310
4349
|
for (let i = 0; i < children.length; i++) {
|
|
4311
|
-
|
|
4350
|
+
let child = children[i];
|
|
4351
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
4352
|
+
const key = parentKey == null
|
|
4353
|
+
? child.key
|
|
4354
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4312
4355
|
// handle fragment children case, e.g. v-for
|
|
4313
4356
|
if (child.type === Fragment) {
|
|
4314
4357
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4315
4358
|
keyedFragmentCount++;
|
|
4316
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
4359
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4317
4360
|
}
|
|
4318
4361
|
// comment placeholders should be skipped, e.g. v-if
|
|
4319
4362
|
else if (keepComment || child.type !== Comment) {
|
|
4320
|
-
ret.push(child);
|
|
4363
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
4321
4364
|
}
|
|
4322
4365
|
}
|
|
4323
4366
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -5382,6 +5425,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5382
5425
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5383
5426
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5384
5427
|
let key = propsToUpdate[i];
|
|
5428
|
+
// skip if the prop key is a declared emit event listener
|
|
5429
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5430
|
+
continue;
|
|
5431
|
+
}
|
|
5385
5432
|
// PROPS flag guarantees rawProps to be non-null
|
|
5386
5433
|
const value = rawProps[key];
|
|
5387
5434
|
if (options) {
|
|
@@ -5969,7 +6016,8 @@ function withDirectives(vnode, directives) {
|
|
|
5969
6016
|
(process.env.NODE_ENV !== 'production') && warn$1(`withDirectives can only be used inside render functions.`);
|
|
5970
6017
|
return vnode;
|
|
5971
6018
|
}
|
|
5972
|
-
const instance = internalInstance
|
|
6019
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
6020
|
+
internalInstance.proxy;
|
|
5973
6021
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5974
6022
|
for (let i = 0; i < directives.length; i++) {
|
|
5975
6023
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -6089,7 +6137,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
6089
6137
|
return vm;
|
|
6090
6138
|
}
|
|
6091
6139
|
}
|
|
6092
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
6140
|
+
Vue.version = `2.6.14-compat:${"3.2.33"}`;
|
|
6093
6141
|
Vue.config = singletonApp.config;
|
|
6094
6142
|
Vue.use = (p, ...options) => {
|
|
6095
6143
|
if (p && isFunction(p.install)) {
|
|
@@ -6518,6 +6566,9 @@ function createAppContext() {
|
|
|
6518
6566
|
let uid = 0;
|
|
6519
6567
|
function createAppAPI(render, hydrate) {
|
|
6520
6568
|
return function createApp(rootComponent, rootProps = null) {
|
|
6569
|
+
if (!isFunction(rootComponent)) {
|
|
6570
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
6571
|
+
}
|
|
6521
6572
|
if (rootProps != null && !isObject(rootProps)) {
|
|
6522
6573
|
(process.env.NODE_ENV !== 'production') && warn$1(`root props passed to app.mount() must be an object.`);
|
|
6523
6574
|
rootProps = null;
|
|
@@ -6720,6 +6771,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
6720
6771
|
if (!isArray(existing)) {
|
|
6721
6772
|
if (_isString) {
|
|
6722
6773
|
refs[ref] = [refValue];
|
|
6774
|
+
if (hasOwn(setupState, ref)) {
|
|
6775
|
+
setupState[ref] = refs[ref];
|
|
6776
|
+
}
|
|
6723
6777
|
}
|
|
6724
6778
|
else {
|
|
6725
6779
|
ref.value = [refValue];
|
|
@@ -6920,7 +6974,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6920
6974
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6921
6975
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6922
6976
|
// skip props & children if this is hoisted static nodes
|
|
6923
|
-
|
|
6977
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6978
|
+
if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) {
|
|
6924
6979
|
if (dirs) {
|
|
6925
6980
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6926
6981
|
}
|
|
@@ -7095,7 +7150,7 @@ function startMeasure(instance, type) {
|
|
|
7095
7150
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
7096
7151
|
}
|
|
7097
7152
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
7098
|
-
devtoolsPerfStart(instance, type,
|
|
7153
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7099
7154
|
}
|
|
7100
7155
|
}
|
|
7101
7156
|
function endMeasure(instance, type) {
|
|
@@ -7108,7 +7163,7 @@ function endMeasure(instance, type) {
|
|
|
7108
7163
|
perf.clearMarks(endTag);
|
|
7109
7164
|
}
|
|
7110
7165
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
7111
|
-
devtoolsPerfEnd(instance, type,
|
|
7166
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7112
7167
|
}
|
|
7113
7168
|
}
|
|
7114
7169
|
function isSupported() {
|
|
@@ -8297,7 +8352,23 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8297
8352
|
const remove = vnode => {
|
|
8298
8353
|
const { type, el, anchor, transition } = vnode;
|
|
8299
8354
|
if (type === Fragment) {
|
|
8300
|
-
|
|
8355
|
+
if ((process.env.NODE_ENV !== 'production') &&
|
|
8356
|
+
vnode.patchFlag > 0 &&
|
|
8357
|
+
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
8358
|
+
transition &&
|
|
8359
|
+
!transition.persisted) {
|
|
8360
|
+
vnode.children.forEach(child => {
|
|
8361
|
+
if (child.type === Comment) {
|
|
8362
|
+
hostRemove(child.el);
|
|
8363
|
+
}
|
|
8364
|
+
else {
|
|
8365
|
+
remove(child);
|
|
8366
|
+
}
|
|
8367
|
+
});
|
|
8368
|
+
}
|
|
8369
|
+
else {
|
|
8370
|
+
removeFragment(el, anchor);
|
|
8371
|
+
}
|
|
8301
8372
|
return;
|
|
8302
8373
|
}
|
|
8303
8374
|
if (type === Static) {
|
|
@@ -9695,7 +9766,10 @@ function renderSlot(slots, name, props = {},
|
|
|
9695
9766
|
// this is not a user-facing function, so the fallback is always generated by
|
|
9696
9767
|
// the compiler and guaranteed to be a function returning an array
|
|
9697
9768
|
fallback, noSlotted) {
|
|
9698
|
-
if (currentRenderingInstance.isCE
|
|
9769
|
+
if (currentRenderingInstance.isCE ||
|
|
9770
|
+
(currentRenderingInstance.parent &&
|
|
9771
|
+
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
9772
|
+
currentRenderingInstance.parent.isCE)) {
|
|
9699
9773
|
return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
|
|
9700
9774
|
}
|
|
9701
9775
|
let slot = slots[name];
|
|
@@ -9985,7 +10059,10 @@ const getPublicInstance = (i) => {
|
|
|
9985
10059
|
return getExposeProxy(i) || i.proxy;
|
|
9986
10060
|
return getPublicInstance(i.parent);
|
|
9987
10061
|
};
|
|
9988
|
-
const publicPropertiesMap =
|
|
10062
|
+
const publicPropertiesMap =
|
|
10063
|
+
// Move PURE marker to new line to workaround compiler discarding it
|
|
10064
|
+
// due to type annotation
|
|
10065
|
+
/*#__PURE__*/ extend(Object.create(null), {
|
|
9989
10066
|
$: i => i,
|
|
9990
10067
|
$el: i => i.vnode.el,
|
|
9991
10068
|
$data: i => i.data,
|
|
@@ -10099,7 +10176,9 @@ const PublicInstanceProxyHandlers = {
|
|
|
10099
10176
|
}
|
|
10100
10177
|
else {
|
|
10101
10178
|
const val = globalProperties[key];
|
|
10102
|
-
return isFunction(val)
|
|
10179
|
+
return isFunction(val)
|
|
10180
|
+
? Object.assign(val.bind(instance.proxy), val)
|
|
10181
|
+
: val;
|
|
10103
10182
|
}
|
|
10104
10183
|
}
|
|
10105
10184
|
}
|
|
@@ -10125,9 +10204,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
10125
10204
|
const { data, setupState, ctx } = instance;
|
|
10126
10205
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
10127
10206
|
setupState[key] = value;
|
|
10207
|
+
return true;
|
|
10128
10208
|
}
|
|
10129
10209
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
10130
10210
|
data[key] = value;
|
|
10211
|
+
return true;
|
|
10131
10212
|
}
|
|
10132
10213
|
else if (hasOwn(instance.props, key)) {
|
|
10133
10214
|
(process.env.NODE_ENV !== 'production') &&
|
|
@@ -10163,6 +10244,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
10163
10244
|
hasOwn(ctx, key) ||
|
|
10164
10245
|
hasOwn(publicPropertiesMap, key) ||
|
|
10165
10246
|
hasOwn(appContext.config.globalProperties, key));
|
|
10247
|
+
},
|
|
10248
|
+
defineProperty(target, key, descriptor) {
|
|
10249
|
+
if (descriptor.get != null) {
|
|
10250
|
+
// invalidate key cache of a getter based property #5417
|
|
10251
|
+
target._.accessCache[key] = 0;
|
|
10252
|
+
}
|
|
10253
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
10254
|
+
this.set(target, key, descriptor.value, null);
|
|
10255
|
+
}
|
|
10256
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
10166
10257
|
}
|
|
10167
10258
|
};
|
|
10168
10259
|
if ((process.env.NODE_ENV !== 'production') && !false) {
|
|
@@ -10368,6 +10459,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
10368
10459
|
return setupResult;
|
|
10369
10460
|
}
|
|
10370
10461
|
function setupStatefulComponent(instance, isSSR) {
|
|
10462
|
+
var _a;
|
|
10371
10463
|
const Component = instance.type;
|
|
10372
10464
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
10373
10465
|
if (Component.name) {
|
|
@@ -10425,6 +10517,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10425
10517
|
// async setup returned Promise.
|
|
10426
10518
|
// bail here and wait for re-entry.
|
|
10427
10519
|
instance.asyncDep = setupResult;
|
|
10520
|
+
if ((process.env.NODE_ENV !== 'production') && !instance.suspense) {
|
|
10521
|
+
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
10522
|
+
warn$1(`Component <${name}>: setup function returned a promise, but no ` +
|
|
10523
|
+
`<Suspense> boundary was found in the parent component tree. ` +
|
|
10524
|
+
`A component with async setup() must be nested in a <Suspense> ` +
|
|
10525
|
+
`in order to be rendered.`);
|
|
10526
|
+
}
|
|
10428
10527
|
}
|
|
10429
10528
|
}
|
|
10430
10529
|
else {
|
|
@@ -11077,7 +11176,7 @@ function isMemoSame(cached, memo) {
|
|
|
11077
11176
|
}
|
|
11078
11177
|
|
|
11079
11178
|
// Core API ------------------------------------------------------------------
|
|
11080
|
-
const version = "3.2.
|
|
11179
|
+
const version = "3.2.33";
|
|
11081
11180
|
const _ssrUtils = {
|
|
11082
11181
|
createComponentInstance,
|
|
11083
11182
|
setupComponent,
|
|
@@ -11109,7 +11208,7 @@ const compatUtils = (_compatUtils );
|
|
|
11109
11208
|
|
|
11110
11209
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
11111
11210
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
11112
|
-
const templateContainer = doc && doc.createElement('template');
|
|
11211
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
11113
11212
|
const nodeOps = {
|
|
11114
11213
|
insert: (child, parent, anchor) => {
|
|
11115
11214
|
parent.insertBefore(child, anchor || null);
|
|
@@ -11260,6 +11359,8 @@ function setStyle(style, name, val) {
|
|
|
11260
11359
|
val.forEach(v => setStyle(style, name, v));
|
|
11261
11360
|
}
|
|
11262
11361
|
else {
|
|
11362
|
+
if (val == null)
|
|
11363
|
+
val = '';
|
|
11263
11364
|
if (name.startsWith('--')) {
|
|
11264
11365
|
// custom property definition
|
|
11265
11366
|
style.setProperty(name, val);
|
|
@@ -11381,42 +11482,40 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11381
11482
|
}
|
|
11382
11483
|
return;
|
|
11383
11484
|
}
|
|
11485
|
+
let needRemove = false;
|
|
11384
11486
|
if (value === '' || value == null) {
|
|
11385
11487
|
const type = typeof el[key];
|
|
11386
11488
|
if (type === 'boolean') {
|
|
11387
11489
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
11388
|
-
|
|
11389
|
-
return;
|
|
11490
|
+
value = includeBooleanAttr(value);
|
|
11390
11491
|
}
|
|
11391
11492
|
else if (value == null && type === 'string') {
|
|
11392
11493
|
// e.g. <div :id="null">
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
return;
|
|
11494
|
+
value = '';
|
|
11495
|
+
needRemove = true;
|
|
11396
11496
|
}
|
|
11397
11497
|
else if (type === 'number') {
|
|
11398
11498
|
// e.g. <img :width="null">
|
|
11399
11499
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
}
|
|
11403
|
-
catch (_a) { }
|
|
11404
|
-
el.removeAttribute(key);
|
|
11405
|
-
return;
|
|
11500
|
+
value = 0;
|
|
11501
|
+
needRemove = true;
|
|
11406
11502
|
}
|
|
11407
11503
|
}
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
(
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11504
|
+
else {
|
|
11505
|
+
if (value === false &&
|
|
11506
|
+
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11507
|
+
const type = typeof el[key];
|
|
11508
|
+
if (type === 'string' || type === 'number') {
|
|
11509
|
+
(process.env.NODE_ENV !== 'production') &&
|
|
11510
|
+
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11511
|
+
value = type === 'number' ? 0 : '';
|
|
11512
|
+
needRemove = true;
|
|
11513
|
+
}
|
|
11417
11514
|
}
|
|
11418
11515
|
}
|
|
11419
|
-
// some properties perform value validation and throw
|
|
11516
|
+
// some properties perform value validation and throw,
|
|
11517
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
11518
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
11420
11519
|
try {
|
|
11421
11520
|
el[key] = value;
|
|
11422
11521
|
}
|
|
@@ -11426,31 +11525,35 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11426
11525
|
`value ${value} is invalid.`, e);
|
|
11427
11526
|
}
|
|
11428
11527
|
}
|
|
11528
|
+
needRemove && el.removeAttribute(key);
|
|
11429
11529
|
}
|
|
11430
11530
|
|
|
11431
11531
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
11432
|
-
|
|
11433
|
-
let
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11532
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
11533
|
+
let _getNow = Date.now;
|
|
11534
|
+
let skipTimestampCheck = false;
|
|
11535
|
+
if (typeof window !== 'undefined') {
|
|
11536
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
11537
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
11538
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
11539
|
+
// same timestamp type when saving the flush timestamp.
|
|
11540
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
11541
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
11542
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
11543
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
11544
|
+
_getNow = () => performance.now();
|
|
11545
|
+
}
|
|
11546
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
11547
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
11548
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
11549
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
11550
|
+
}
|
|
11551
|
+
return [_getNow, skipTimestampCheck];
|
|
11552
|
+
})();
|
|
11450
11553
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
11451
11554
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
11452
11555
|
let cachedNow = 0;
|
|
11453
|
-
const p = Promise.resolve();
|
|
11556
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
11454
11557
|
const reset = () => {
|
|
11455
11558
|
cachedNow = 0;
|
|
11456
11559
|
};
|
|
@@ -11575,13 +11678,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11575
11678
|
}
|
|
11576
11679
|
return false;
|
|
11577
11680
|
}
|
|
11578
|
-
//
|
|
11579
|
-
//
|
|
11580
|
-
//
|
|
11581
|
-
//
|
|
11681
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
11682
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
11683
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
11684
|
+
// them as attributes.
|
|
11582
11685
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
11583
11686
|
// property is also enumerated string values.
|
|
11584
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
11687
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
11585
11688
|
return false;
|
|
11586
11689
|
}
|
|
11587
11690
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -12761,7 +12864,7 @@ function initVShowForSSR() {
|
|
|
12761
12864
|
};
|
|
12762
12865
|
}
|
|
12763
12866
|
|
|
12764
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
12867
|
+
const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12765
12868
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
12766
12869
|
// in case the user only imports reactivity utilities from Vue.
|
|
12767
12870
|
let renderer;
|