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

fix(mp): mp-baidu onShow

上级 16428aab
......@@ -1208,7 +1208,9 @@ function parseComponent (vueOptions) {
this.pageinstance.$vm = this.$vm;
this.$vm.$mp.query = this.pageinstance._$args; // 兼容 mpvue
this.$vm.__call_hook('onLoad', this.pageinstance._$args);
this.$vm.__call_hook('onLoad', this.pageinstance._$args);
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
this.$vm.__call_hook('onShow');
}
};
......@@ -1261,7 +1263,7 @@ function onPageUnload ($vm) {
});
}
function parsePage (vuePageOptions) {
function parsePage (vuePageOptions) {
const pageOptions = parseBasePage(vuePageOptions, {
isPage: isPage$1,
initRelation: initRelation$1
......@@ -1271,6 +1273,8 @@ function parsePage (vuePageOptions) {
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
this.pageinstance._$args = args;
};
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
delete pageOptions.methods.onShow;
pageOptions.methods.onUnload = function onUnload () {
this.$vm.__call_hook('onUnload');
......
{
"name": "@dcloudio/uni-mp-baidu",
"version": "0.0.837",
"version": "0.0.838",
"description": "uni-app mp-baidu",
"main": "dist/index.js",
"scripts": {
......
......@@ -20,7 +20,9 @@ export default function parseComponent (vueOptions) {
this.pageinstance.$vm = this.$vm
this.$vm.$mp.query = this.pageinstance._$args // 兼容 mpvue
this.$vm.__call_hook('onLoad', this.pageinstance._$args)
this.$vm.__call_hook('onLoad', this.pageinstance._$args)
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
this.$vm.__call_hook('onShow')
}
}
......
......@@ -19,7 +19,7 @@ function onPageUnload ($vm) {
})
}
export default function parsePage (vuePageOptions) {
export default function parsePage (vuePageOptions) {
const pageOptions = parseBasePage(vuePageOptions, {
isPage,
initRelation
......@@ -29,6 +29,8 @@ export default function parsePage (vuePageOptions) {
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
this.pageinstance._$args = args
}
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
delete pageOptions.methods.onShow
pageOptions.methods.onUnload = function onUnload () {
this.$vm.__call_hook('onUnload')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册