vue 2.7.11 → 2.7.13
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.common.dev.js +12 -10
- package/dist/vue.common.prod.js +3 -3
- package/dist/vue.esm.browser.js +12 -10
- package/dist/vue.esm.browser.min.js +3 -3
- package/dist/vue.esm.js +12 -10
- package/dist/vue.js +12 -10
- package/dist/vue.min.js +3 -3
- package/dist/vue.runtime.common.dev.js +12 -10
- package/dist/vue.runtime.common.prod.js +3 -3
- package/dist/vue.runtime.esm.js +12 -10
- package/dist/vue.runtime.js +12 -10
- package/dist/vue.runtime.min.js +3 -3
- package/package.json +2 -2
- package/packages/compiler-sfc/dist/compiler-sfc.js +1 -0
- package/packages/compiler-sfc/package.json +1 -1
- package/src/core/instance/init.ts +2 -7
- package/src/core/instance/state.ts +7 -2
- package/src/core/observer/traverse.ts +1 -0
- package/src/v3/reactivity/effectScope.ts +4 -5
- package/types/jsx.d.ts +1 -1
- package/types/v3-generated.d.ts +1 -0
package/dist/vue.common.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.7.
|
|
2
|
+
* Vue.js v2.7.13
|
|
3
3
|
* (c) 2014-2022 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3434,6 +3434,7 @@ function doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigge
|
|
|
3434
3434
|
let activeEffectScope;
|
|
3435
3435
|
class EffectScope {
|
|
3436
3436
|
constructor(detached = false) {
|
|
3437
|
+
this.detached = detached;
|
|
3437
3438
|
/**
|
|
3438
3439
|
* @internal
|
|
3439
3440
|
*/
|
|
@@ -3446,8 +3447,8 @@ class EffectScope {
|
|
|
3446
3447
|
* @internal
|
|
3447
3448
|
*/
|
|
3448
3449
|
this.cleanups = [];
|
|
3450
|
+
this.parent = activeEffectScope;
|
|
3449
3451
|
if (!detached && activeEffectScope) {
|
|
3450
|
-
this.parent = activeEffectScope;
|
|
3451
3452
|
this.index =
|
|
3452
3453
|
(activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
3453
3454
|
}
|
|
@@ -3496,7 +3497,7 @@ class EffectScope {
|
|
|
3496
3497
|
}
|
|
3497
3498
|
}
|
|
3498
3499
|
// nested scope, dereference from parent to avoid memory leaks
|
|
3499
|
-
if (this.parent && !fromParent) {
|
|
3500
|
+
if (!this.detached && this.parent && !fromParent) {
|
|
3500
3501
|
// optimized O(1) removal
|
|
3501
3502
|
const last = this.parent.scopes.pop();
|
|
3502
3503
|
if (last && last !== this) {
|
|
@@ -3504,6 +3505,7 @@ class EffectScope {
|
|
|
3504
3505
|
last.index = this.index;
|
|
3505
3506
|
}
|
|
3506
3507
|
}
|
|
3508
|
+
this.parent = undefined;
|
|
3507
3509
|
this.active = false;
|
|
3508
3510
|
}
|
|
3509
3511
|
}
|
|
@@ -3931,7 +3933,7 @@ function onErrorCaptured(hook, target = currentInstance) {
|
|
|
3931
3933
|
/**
|
|
3932
3934
|
* Note: also update dist/vue.runtime.mjs when adding new exports to this file.
|
|
3933
3935
|
*/
|
|
3934
|
-
const version = '2.7.
|
|
3936
|
+
const version = '2.7.13';
|
|
3935
3937
|
/**
|
|
3936
3938
|
* @internal type is manually declared in <root>/types/v3-define-component.d.ts
|
|
3937
3939
|
*/
|
|
@@ -4014,6 +4016,7 @@ function _traverse(val, seen) {
|
|
|
4014
4016
|
let i, keys;
|
|
4015
4017
|
const isA = isArray(val);
|
|
4016
4018
|
if ((!isA && !isObject(val)) ||
|
|
4019
|
+
val.__v_skip /* ReactiveFlags.SKIP */ ||
|
|
4017
4020
|
Object.isFrozen(val) ||
|
|
4018
4021
|
val instanceof VNode) {
|
|
4019
4022
|
return;
|
|
@@ -4259,6 +4262,10 @@ function proxy(target, sourceKey, key) {
|
|
|
4259
4262
|
}
|
|
4260
4263
|
function initState(vm) {
|
|
4261
4264
|
const opts = vm.$options;
|
|
4265
|
+
if (opts.props)
|
|
4266
|
+
initProps$1(vm, opts.props);
|
|
4267
|
+
// Composition API
|
|
4268
|
+
initSetup(vm);
|
|
4262
4269
|
if (opts.methods)
|
|
4263
4270
|
initMethods(vm, opts.methods);
|
|
4264
4271
|
if (opts.data) {
|
|
@@ -4275,8 +4282,6 @@ function initState(vm) {
|
|
|
4275
4282
|
}
|
|
4276
4283
|
}
|
|
4277
4284
|
function initProps$1(vm, propsOptions) {
|
|
4278
|
-
if (!propsOptions)
|
|
4279
|
-
return;
|
|
4280
4285
|
const propsData = vm.$options.propsData || {};
|
|
4281
4286
|
const props = (vm._props = shallowReactive({}));
|
|
4282
4287
|
// cache prop keys so that future props updates can iterate using Array
|
|
@@ -4637,11 +4642,8 @@ function initMixin$1(Vue) {
|
|
|
4637
4642
|
initLifecycle(vm);
|
|
4638
4643
|
initEvents(vm);
|
|
4639
4644
|
initRender(vm);
|
|
4640
|
-
const opts = vm.$options;
|
|
4641
|
-
initInjections(vm); // resolve injections before data/props
|
|
4642
|
-
initProps$1(vm, opts.props);
|
|
4643
|
-
initSetup(vm);
|
|
4644
4645
|
callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);
|
|
4646
|
+
initInjections(vm); // resolve injections before data/props
|
|
4645
4647
|
initState(vm);
|
|
4646
4648
|
initProvide(vm); // resolve provide after data/props
|
|
4647
4649
|
callHook$1(vm, 'created');
|