提交 7e088bb5 编写于 作者: Q qiang

fix: lint

上级 0caf386e
import {
isPage,
isPage,
initRelation
} from './util'
......@@ -23,23 +23,23 @@ export default function parsePage (vuePageOptions) {
const pageOptions = parseBasePage(vuePageOptions, {
isPage,
initRelation
})
const newLifecycle = swan.canIUse('lifecycle-2-0')
// 纠正百度小程序新生命周期(2.0)methods:onShow在methods:onLoad之前触发的问题
if (newLifecycle) {
delete pageOptions.methods.onShow
})
const newLifecycle = swan.canIUse('lifecycle-2-0')
// 纠正百度小程序新生命周期(2.0)methods:onShow在methods:onLoad之前触发的问题
if (newLifecycle) {
delete pageOptions.methods.onShow
}
pageOptions.methods.onLoad = function onLoad (args) {
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
if (this.$vm) {
this.$vm.$mp.query = args
this.$vm.__call_hook('onLoad', args)
this.$vm.__call_hook('onShow')
} else {
this.pageinstance._$args = args
if (this.$vm) {
this.$vm.$mp.query = args
this.$vm.__call_hook('onLoad', args)
this.$vm.__call_hook('onShow')
} else {
this.pageinstance._$args = args
}
}
......@@ -49,4 +49,4 @@ export default function parsePage (vuePageOptions) {
}
return pageOptions
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册