@vue/compiler-sfc 2.7.13 → 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 +25 -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
|
}
|
|
@@ -5447,7 +5445,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
5447
5445
|
/**
|
|
5448
5446
|
* Helper that recursively merges two data objects together.
|
|
5449
5447
|
*/
|
|
5450
|
-
function mergeData(to, from) {
|
|
5448
|
+
function mergeData(to, from, recursive = true) {
|
|
5451
5449
|
if (!from)
|
|
5452
5450
|
return to;
|
|
5453
5451
|
let key, toVal, fromVal;
|
|
@@ -5461,7 +5459,7 @@ function mergeData(to, from) {
|
|
|
5461
5459
|
continue;
|
|
5462
5460
|
toVal = to[key];
|
|
5463
5461
|
fromVal = from[key];
|
|
5464
|
-
if (!hasOwn(to, key)) {
|
|
5462
|
+
if (!recursive || !hasOwn(to, key)) {
|
|
5465
5463
|
set(to, key, fromVal);
|
|
5466
5464
|
}
|
|
5467
5465
|
else if (toVal !== fromVal &&
|
|
@@ -5622,7 +5620,19 @@ strats.props =
|
|
|
5622
5620
|
extend(ret, childVal);
|
|
5623
5621
|
return ret;
|
|
5624
5622
|
};
|
|
5625
|
-
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
|
+
};
|
|
5626
5636
|
/**
|
|
5627
5637
|
* Default strategy.
|
|
5628
5638
|
*/
|
|
@@ -9537,9 +9547,11 @@ function resolveTemplateUsageCheckString(sfc, isTS) {
|
|
|
9537
9547
|
if (dirRE.test(name)) {
|
|
9538
9548
|
const baseName = onRE.test(name)
|
|
9539
9549
|
? 'on'
|
|
9540
|
-
:
|
|
9541
|
-
? '
|
|
9542
|
-
:
|
|
9550
|
+
: slotRE.test(name)
|
|
9551
|
+
? 'slot'
|
|
9552
|
+
: bindRE.test(name)
|
|
9553
|
+
? 'bind'
|
|
9554
|
+
: name.replace(dirRE, '');
|
|
9543
9555
|
if (!isBuiltInDir$1(baseName)) {
|
|
9544
9556
|
code += `,v${capitalize(camelize(baseName))}`;
|
|
9545
9557
|
}
|
|
@@ -12136,7 +12148,7 @@ function genFor(el, state, altGen, altHelper) {
|
|
|
12136
12148
|
!el.key) {
|
|
12137
12149
|
state.warn(`<${el.tag} v-for="${alias} in ${exp}">: component lists rendered with ` +
|
|
12138
12150
|
`v-for should have explicit keys. ` +
|
|
12139
|
-
`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 */);
|
|
12140
12152
|
}
|
|
12141
12153
|
el.forProcessed = true; // avoid recursion
|
|
12142
12154
|
return (`${altHelper || '_l'}((${exp}),` +
|