提交 c07b5391 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(mp-baidu): onInit not trigger (question/154352)

上级 a7bf282f
......@@ -39,7 +39,11 @@ export default function parseBasePage (vuePageOptions, {
this.$vm.$mp.query = query // 兼容 mpvue
this.$vm.__call_hook('onLoad', query)
}
initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady'])
if (__PLATFORM__ === 'mp-baidu') {
initUnknownHooks(pageOptions.methods, vuePageOptions, ['onInit', 'onReady'])
} else {
initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady'])
}
return pageOptions
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册