Skip to content

Commit

Permalink
fix(tarojs): method rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Simbachen committed Apr 19, 2018
1 parent 7385099 commit 4290c43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/taro/src/create-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ function initPage (weappPageConf, page) {
return recurrenceComponent(weappPageConf, page)
}

function componentActivate (component, key) {
function componentTrigger (component, key) {
Object.getOwnPropertyNames(component.$$components || {}).forEach(name => {
componentActivate(component.$$components[name], key)
componentTrigger(component.$$components[name], key)
})
component[key] && typeof component[key] === 'function' && component[key]()
}
Expand All @@ -114,13 +114,13 @@ function createPage (PageClass) {
page.$router = {
params: options
}
componentActivate(page, 'componentWillMount')
componentTrigger(page, 'componentWillMount')
},
onReady () {
componentActivate(page, 'componentDidMount')
componentTrigger(page, 'componentDidMount')
},
onUnload () {
componentActivate(page, 'componentDidUnmount')
componentTrigger(page, 'componentDidUnmount')
},
_setData (data, cb, isRoot) {
this.stateList.push({
Expand Down

0 comments on commit 4290c43

Please sign in to comment.