@vue/runtime-dom 3.2.31 → 3.2.32
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.
|
@@ -351,8 +351,17 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
351
351
|
let activeEffectScope;
|
|
352
352
|
class EffectScope {
|
|
353
353
|
constructor(detached = false) {
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
354
357
|
this.active = true;
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
355
361
|
this.effects = [];
|
|
362
|
+
/**
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
356
365
|
this.cleanups = [];
|
|
357
366
|
if (!detached && activeEffectScope) {
|
|
358
367
|
this.parent = activeEffectScope;
|
|
@@ -362,21 +371,30 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
362
371
|
}
|
|
363
372
|
run(fn) {
|
|
364
373
|
if (this.active) {
|
|
374
|
+
const currentEffectScope = activeEffectScope;
|
|
365
375
|
try {
|
|
366
376
|
activeEffectScope = this;
|
|
367
377
|
return fn();
|
|
368
378
|
}
|
|
369
379
|
finally {
|
|
370
|
-
activeEffectScope =
|
|
380
|
+
activeEffectScope = currentEffectScope;
|
|
371
381
|
}
|
|
372
382
|
}
|
|
373
383
|
else {
|
|
374
384
|
warn(`cannot run an inactive effect scope.`);
|
|
375
385
|
}
|
|
376
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* This should only be called on non-detached scopes
|
|
389
|
+
* @internal
|
|
390
|
+
*/
|
|
377
391
|
on() {
|
|
378
392
|
activeEffectScope = this;
|
|
379
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* This should only be called on non-detached scopes
|
|
396
|
+
* @internal
|
|
397
|
+
*/
|
|
380
398
|
off() {
|
|
381
399
|
activeEffectScope = this.parent;
|
|
382
400
|
}
|
|
@@ -600,9 +618,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
600
618
|
dep.add(activeEffect);
|
|
601
619
|
activeEffect.deps.push(dep);
|
|
602
620
|
if (activeEffect.onTrack) {
|
|
603
|
-
activeEffect.onTrack(Object.assign({
|
|
604
|
-
effect: activeEffect
|
|
605
|
-
}, debuggerEventExtraInfo));
|
|
621
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
606
622
|
}
|
|
607
623
|
}
|
|
608
624
|
}
|
|
@@ -3086,12 +3102,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3086
3102
|
return doWatch(effect, null, options);
|
|
3087
3103
|
}
|
|
3088
3104
|
function watchPostEffect(effect, options) {
|
|
3089
|
-
return doWatch(effect, null, (Object.assign(
|
|
3090
|
-
));
|
|
3105
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
3091
3106
|
}
|
|
3092
3107
|
function watchSyncEffect(effect, options) {
|
|
3093
|
-
return doWatch(effect, null, (Object.assign(
|
|
3094
|
-
));
|
|
3108
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
3095
3109
|
}
|
|
3096
3110
|
// initial value for watchers to trigger on undefined initial values
|
|
3097
3111
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -3388,7 +3402,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3388
3402
|
const { mode } = rawProps;
|
|
3389
3403
|
// check mode
|
|
3390
3404
|
if (mode &&
|
|
3391
|
-
mode !== 'in-out' &&
|
|
3405
|
+
mode !== 'in-out' &&
|
|
3406
|
+
mode !== 'out-in' &&
|
|
3407
|
+
mode !== 'default') {
|
|
3392
3408
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3393
3409
|
}
|
|
3394
3410
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3615,20 +3631,24 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3615
3631
|
vnode.transition = hooks;
|
|
3616
3632
|
}
|
|
3617
3633
|
}
|
|
3618
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
3634
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3619
3635
|
let ret = [];
|
|
3620
3636
|
let keyedFragmentCount = 0;
|
|
3621
3637
|
for (let i = 0; i < children.length; i++) {
|
|
3622
|
-
|
|
3638
|
+
let child = children[i];
|
|
3639
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
3640
|
+
const key = parentKey == null
|
|
3641
|
+
? child.key
|
|
3642
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
3623
3643
|
// handle fragment children case, e.g. v-for
|
|
3624
3644
|
if (child.type === Fragment) {
|
|
3625
3645
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
3626
3646
|
keyedFragmentCount++;
|
|
3627
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
3647
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
3628
3648
|
}
|
|
3629
3649
|
// comment placeholders should be skipped, e.g. v-if
|
|
3630
3650
|
else if (keepComment || child.type !== Comment) {
|
|
3631
|
-
ret.push(child);
|
|
3651
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
3632
3652
|
}
|
|
3633
3653
|
}
|
|
3634
3654
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -4594,6 +4614,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4594
4614
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
4595
4615
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
4596
4616
|
let key = propsToUpdate[i];
|
|
4617
|
+
// skip if the prop key is a declared emit event listener
|
|
4618
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
4619
|
+
continue;
|
|
4620
|
+
}
|
|
4597
4621
|
// PROPS flag guarantees rawProps to be non-null
|
|
4598
4622
|
const value = rawProps[key];
|
|
4599
4623
|
if (options) {
|
|
@@ -5118,7 +5142,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5118
5142
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
5119
5143
|
return vnode;
|
|
5120
5144
|
}
|
|
5121
|
-
const instance = internalInstance
|
|
5145
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5146
|
+
internalInstance.proxy;
|
|
5122
5147
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5123
5148
|
for (let i = 0; i < directives.length; i++) {
|
|
5124
5149
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -5190,6 +5215,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5190
5215
|
let uid = 0;
|
|
5191
5216
|
function createAppAPI(render, hydrate) {
|
|
5192
5217
|
return function createApp(rootComponent, rootProps = null) {
|
|
5218
|
+
if (!isFunction(rootComponent)) {
|
|
5219
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
5220
|
+
}
|
|
5193
5221
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5194
5222
|
warn$1(`root props passed to app.mount() must be an object.`);
|
|
5195
5223
|
rootProps = null;
|
|
@@ -5386,6 +5414,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5386
5414
|
if (!isArray(existing)) {
|
|
5387
5415
|
if (_isString) {
|
|
5388
5416
|
refs[ref] = [refValue];
|
|
5417
|
+
if (hasOwn(setupState, ref)) {
|
|
5418
|
+
setupState[ref] = refs[ref];
|
|
5419
|
+
}
|
|
5389
5420
|
}
|
|
5390
5421
|
else {
|
|
5391
5422
|
ref.value = [refValue];
|
|
@@ -5758,7 +5789,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5758
5789
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
5759
5790
|
}
|
|
5760
5791
|
{
|
|
5761
|
-
devtoolsPerfStart(instance, type,
|
|
5792
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5762
5793
|
}
|
|
5763
5794
|
}
|
|
5764
5795
|
function endMeasure(instance, type) {
|
|
@@ -5771,7 +5802,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5771
5802
|
perf.clearMarks(endTag);
|
|
5772
5803
|
}
|
|
5773
5804
|
{
|
|
5774
|
-
devtoolsPerfEnd(instance, type,
|
|
5805
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5775
5806
|
}
|
|
5776
5807
|
}
|
|
5777
5808
|
function isSupported() {
|
|
@@ -8160,9 +8191,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8160
8191
|
},
|
|
8161
8192
|
defineProperty(target, key, descriptor) {
|
|
8162
8193
|
if (descriptor.get != null) {
|
|
8163
|
-
|
|
8194
|
+
// invalidate key cache of a getter based property #5417
|
|
8195
|
+
target.$.accessCache[key] = 0;
|
|
8164
8196
|
}
|
|
8165
|
-
else if (descriptor
|
|
8197
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
8166
8198
|
this.set(target, key, descriptor.value, null);
|
|
8167
8199
|
}
|
|
8168
8200
|
return Reflect.defineProperty(target, key, descriptor);
|
|
@@ -9036,7 +9068,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
9036
9068
|
}
|
|
9037
9069
|
|
|
9038
9070
|
// Core API ------------------------------------------------------------------
|
|
9039
|
-
const version = "3.2.
|
|
9071
|
+
const version = "3.2.32";
|
|
9040
9072
|
/**
|
|
9041
9073
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9042
9074
|
* @internal
|