提交 9db2ab6b 编写于 作者: Q qiang

Merge branch 'v3' of github.com:dcloudio/uni-app into v3

......@@ -24,7 +24,7 @@ export function isSyncApi (name) {
}
export function isCallbackApi (name) {
return CALLBACK_API_RE.test(name)
return CALLBACK_API_RE.test(name) && name !== 'onPush'
}
export function isTaskApi (name) {
......
......@@ -28,6 +28,14 @@ export default {
return this.$root.$scope.$page
}
})
// 兼容旧版本
Object.defineProperty(Vue.prototype, '$mp', {
get () {
return {
page: this.$root.$scope.$page
}
}
})
const oldMount = Vue.prototype.$mount
Vue.prototype.$mount = function mount (el, hydrating) {
......@@ -46,7 +54,8 @@ export default {
) {
vdSyncCallbacks.push(cb)
} else {
Vue.nextTick(cb)
// $nextTick bind vm context
Vue.nextTick.call(this, cb)
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册