提交 58a38b96 编写于 作者: fxy060608's avatar fxy060608

build(mp): bump vue from 3.0.3 to 3.0.4

上级 ec0ae131
...@@ -1386,7 +1386,7 @@ function resolveAsset(type, name, warnMissing = true) { ...@@ -1386,7 +1386,7 @@ function resolveAsset(type, name, warnMissing = true) {
if (name === `_self`) { if (name === `_self`) {
return Component; return Component;
} }
const selfName = Component.displayName || Component.name; const selfName = getComponentName(Component);
if (selfName && if (selfName &&
(selfName === name || (selfName === name ||
selfName === camelize(name) || selfName === camelize(name) ||
...@@ -2354,6 +2354,7 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [], ...@@ -2354,6 +2354,7 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [],
deferredData.forEach(dataFn => resolveData(instance, dataFn, publicThis)); deferredData.forEach(dataFn => resolveData(instance, dataFn, publicThis));
} }
if (dataOptions) { if (dataOptions) {
// @ts-ignore dataOptions is not fully type safe
resolveData(instance, dataOptions, publicThis); resolveData(instance, dataOptions, publicThis);
} }
if ((process.env.NODE_ENV !== 'production')) { if ((process.env.NODE_ENV !== 'production')) {
...@@ -3190,11 +3191,14 @@ function recordInstanceBoundEffect(effect, instance = currentInstance) { ...@@ -3190,11 +3191,14 @@ function recordInstanceBoundEffect(effect, instance = currentInstance) {
} }
const classifyRE = /(?:^|[-_])(\w)/g; const classifyRE = /(?:^|[-_])(\w)/g;
const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
/* istanbul ignore next */ function getComponentName(Component) {
function formatComponentName(instance, Component, isRoot = false) { return isFunction(Component)
let name = isFunction(Component)
? Component.displayName || Component.name ? Component.displayName || Component.name
: Component.name; : Component.name;
}
/* istanbul ignore next */
function formatComponentName(instance, Component, isRoot = false) {
let name = getComponentName(Component);
if (!name && Component.__file) { if (!name && Component.__file) {
const match = Component.__file.match(/([^/\\]+)\.\w+$/); const match = Component.__file.match(/([^/\\]+)\.\w+$/);
if (match) { if (match) {
...@@ -3243,7 +3247,7 @@ function defineEmit() { ...@@ -3243,7 +3247,7 @@ function defineEmit() {
} }
// Core API ------------------------------------------------------------------ // Core API ------------------------------------------------------------------
const version = "3.0.3"; const version = "3.0.4";
// import deepCopy from './deepCopy' // import deepCopy from './deepCopy'
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册