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

fix(runtime): mp globalData

上级 39c2550b
......@@ -663,7 +663,11 @@ function createApp (vm) {
this.$vm.__call_hook('onLaunch', args);
}
};
};
if (vm.$options.globalData) { // 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData;
}
initHooks(appOptions, hooks); // 延迟执行,因为 App 的注册在 main.js 之前,可能导致生命周期内 Vue 原型上开发者注册的属性无法访问
......
{
"name": "@dcloudio/uni-app-plus",
"version": "0.0.212",
"version": "0.0.213",
"description": "uni-app app-plus",
"main": "dist/index.js",
"scripts": {
......
......@@ -695,7 +695,11 @@ function createApp (vm) {
this.$vm.__call_hook('onLaunch', args);
}
};
};
if (vm.$options.globalData) { // 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData;
}
initHooks(appOptions, hooks); // 延迟执行,因为 App 的注册在 main.js 之前,可能导致生命周期内 Vue 原型上开发者注册的属性无法访问
......
{
"name": "@dcloudio/uni-mp-weixin",
"version": "0.0.931",
"version": "0.0.932",
"description": "uni-app mp-weixin",
"main": "dist/index.js",
"scripts": {
......
......@@ -57,6 +57,10 @@ export function createApp (vm) {
this.$vm.__call_hook('onLaunch', args)
}
}
if (vm.$options.globalData) { // 兼容旧版本 globalData
appOptions.globalData = vm.$options.globalData
}
initHooks(appOptions, hooks) // 延迟执行,因为 App 的注册在 main.js 之前,可能导致生命周期内 Vue 原型上开发者注册的属性无法访问
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册