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

npm run build:runtime

上级 a653b7bf
......@@ -1191,6 +1191,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
......@@ -1583,6 +1583,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
......@@ -1328,6 +1328,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
......@@ -1251,6 +1251,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
......@@ -1338,6 +1338,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
......@@ -1191,6 +1191,13 @@ function parseBaseApp (vm, {
// 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData || {};
// 将 methods 中的方法挂在 getApp() 中
const methods = vm.$options.methods;
if (methods) {
Object.keys(methods).forEach(name => {
appOptions[name] = methods[name];
});
}
initHooks(appOptions, hooks);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册