@vue/compiler-sfc 2.7.12 → 2.7.14
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/compiler-sfc.js +26 -13
- package/package.json +1 -1
package/dist/compiler-sfc.js
CHANGED
|
@@ -3643,11 +3643,6 @@ methodsToPatch.forEach(function (method) {
|
|
|
3643
3643
|
});
|
|
3644
3644
|
});
|
|
3645
3645
|
|
|
3646
|
-
const rawMap = new WeakMap();
|
|
3647
|
-
function isReadonly(value) {
|
|
3648
|
-
return !!(value && value.__v_isReadonly);
|
|
3649
|
-
}
|
|
3650
|
-
|
|
3651
3646
|
const arrayKeys = Object.getOwnPropertyNames(arrayMethods);
|
|
3652
3647
|
const NO_INIITIAL_VALUE = {};
|
|
3653
3648
|
/**
|
|
@@ -3734,7 +3729,6 @@ function observe(value, shallow, ssrMockReactivity) {
|
|
|
3734
3729
|
(isArray(value) || isPlainObject(value)) &&
|
|
3735
3730
|
Object.isExtensible(value) &&
|
|
3736
3731
|
!value.__v_skip /* ReactiveFlags.SKIP */ &&
|
|
3737
|
-
!rawMap.has(value) &&
|
|
3738
3732
|
!isRef(value) &&
|
|
3739
3733
|
!(value instanceof VNode)) {
|
|
3740
3734
|
return new Observer(value, shallow, ssrMockReactivity);
|
|
@@ -3884,6 +3878,10 @@ function dependArray(value) {
|
|
|
3884
3878
|
}
|
|
3885
3879
|
}
|
|
3886
3880
|
|
|
3881
|
+
function isReadonly(value) {
|
|
3882
|
+
return !!(value && value.__v_isReadonly);
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3887
3885
|
function isRef(r) {
|
|
3888
3886
|
return !!(r && r.__v_isRef === true);
|
|
3889
3887
|
}
|
|
@@ -4945,6 +4943,7 @@ function _traverse(val, seen) {
|
|
|
4945
4943
|
let i, keys;
|
|
4946
4944
|
const isA = isArray(val);
|
|
4947
4945
|
if ((!isA && !isObject$1(val)) ||
|
|
4946
|
+
val.__v_skip /* ReactiveFlags.SKIP */ ||
|
|
4948
4947
|
Object.isFrozen(val) ||
|
|
4949
4948
|
val instanceof VNode) {
|
|
4950
4949
|
return;
|
|
@@ -5446,7 +5445,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
5446
5445
|
/**
|
|
5447
5446
|
* Helper that recursively merges two data objects together.
|
|
5448
5447
|
*/
|
|
5449
|
-
function mergeData(to, from) {
|
|
5448
|
+
function mergeData(to, from, recursive = true) {
|
|
5450
5449
|
if (!from)
|
|
5451
5450
|
return to;
|
|
5452
5451
|
let key, toVal, fromVal;
|
|
@@ -5460,7 +5459,7 @@ function mergeData(to, from) {
|
|
|
5460
5459
|
continue;
|
|
5461
5460
|
toVal = to[key];
|
|
5462
5461
|
fromVal = from[key];
|
|
5463
|
-
if (!hasOwn(to, key)) {
|
|
5462
|
+
if (!recursive || !hasOwn(to, key)) {
|
|
5464
5463
|
set(to, key, fromVal);
|
|
5465
5464
|
}
|
|
5466
5465
|
else if (toVal !== fromVal &&
|
|
@@ -5621,7 +5620,19 @@ strats.props =
|
|
|
5621
5620
|
extend(ret, childVal);
|
|
5622
5621
|
return ret;
|
|
5623
5622
|
};
|
|
5624
|
-
strats.provide =
|
|
5623
|
+
strats.provide = function (parentVal, childVal) {
|
|
5624
|
+
if (!parentVal)
|
|
5625
|
+
return childVal;
|
|
5626
|
+
return function () {
|
|
5627
|
+
const ret = Object.create(null);
|
|
5628
|
+
mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);
|
|
5629
|
+
if (childVal) {
|
|
5630
|
+
mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive
|
|
5631
|
+
);
|
|
5632
|
+
}
|
|
5633
|
+
return ret;
|
|
5634
|
+
};
|
|
5635
|
+
};
|
|
5625
5636
|
/**
|
|
5626
5637
|
* Default strategy.
|
|
5627
5638
|
*/
|
|
@@ -9536,9 +9547,11 @@ function resolveTemplateUsageCheckString(sfc, isTS) {
|
|
|
9536
9547
|
if (dirRE.test(name)) {
|
|
9537
9548
|
const baseName = onRE.test(name)
|
|
9538
9549
|
? 'on'
|
|
9539
|
-
:
|
|
9540
|
-
? '
|
|
9541
|
-
:
|
|
9550
|
+
: slotRE.test(name)
|
|
9551
|
+
? 'slot'
|
|
9552
|
+
: bindRE.test(name)
|
|
9553
|
+
? 'bind'
|
|
9554
|
+
: name.replace(dirRE, '');
|
|
9542
9555
|
if (!isBuiltInDir$1(baseName)) {
|
|
9543
9556
|
code += `,v${capitalize(camelize(baseName))}`;
|
|
9544
9557
|
}
|
|
@@ -12135,7 +12148,7 @@ function genFor(el, state, altGen, altHelper) {
|
|
|
12135
12148
|
!el.key) {
|
|
12136
12149
|
state.warn(`<${el.tag} v-for="${alias} in ${exp}">: component lists rendered with ` +
|
|
12137
12150
|
`v-for should have explicit keys. ` +
|
|
12138
|
-
`See https://vuejs.org/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
|
|
12151
|
+
`See https://v2.vuejs.org/v2/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);
|
|
12139
12152
|
}
|
|
12140
12153
|
el.forProcessed = true; // avoid recursion
|
|
12141
12154
|
return (`${altHelper || '_l'}((${exp}),` +
|