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

fix(v3): vuex

上级 4e05397c
......@@ -12986,7 +12986,8 @@ var serviceContext = (function () {
onPageReachBottom,
onReachBottomDistance,
statusbarHeight,
windowTop: windowOptions.titleNView && windowOptions.titleNView.type === 'float' ? (statusbarHeight + TITLEBAR_HEIGHT) : 0,
windowTop: windowOptions.titleNView && windowOptions.titleNView.type === 'float' ? (statusbarHeight +
TITLEBAR_HEIGHT) : 0,
windowBottom: (tabBar$1.indexOf(route) >= 0 && tabBar$1.cover) ? tabBar$1.height : 0
}
}
......@@ -12999,6 +13000,11 @@ var serviceContext = (function () {
// TODO 临时解决方案,service 层也注入 wxs (适用于工具类)
const options = this.$options;
// 自动挂载 $store
if (options.store && !Vue.prototype.$store) {
Vue.prototype.$store = options.store;
}
const wxs = options.wxs;
if (wxs) {
Object.keys(wxs).forEach(module => {
......
......@@ -47,7 +47,8 @@ function parsePageCreateOptions (vm, route) {
onPageReachBottom,
onReachBottomDistance,
statusbarHeight,
windowTop: windowOptions.titleNView && windowOptions.titleNView.type === 'float' ? (statusbarHeight + TITLEBAR_HEIGHT) : 0,
windowTop: windowOptions.titleNView && windowOptions.titleNView.type === 'float' ? (statusbarHeight +
TITLEBAR_HEIGHT) : 0,
windowBottom: (tabBar.indexOf(route) >= 0 && tabBar.cover) ? tabBar.height : 0
}
}
......@@ -60,6 +61,11 @@ export function initLifecycle (Vue) {
// TODO 临时解决方案,service 层也注入 wxs (适用于工具类)
const options = this.$options
// 自动挂载 $store
if (options.store && !Vue.prototype.$store) {
Vue.prototype.$store = options.store
}
const wxs = options.wxs
if (wxs) {
Object.keys(wxs).forEach(module => {
......@@ -95,4 +101,4 @@ export function initLifecycle (Vue) {
}
}
})
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册