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

fix(runtime): globalData

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