Skip to content

Commit

Permalink
chore(runtime): 页面onUnmount的事件改为同步触发,避免降低微信体验评分
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Dec 18, 2020
1 parent 265889d commit 1dca00b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/taro-runtime/src/dsl/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,8 @@ export function createPageConfig (component: any, pageName?: string, data?: Reco
Current.page = null
Current.router = null
const path = getPath(id, this.options)

raf(() => {
eventCenter.trigger(getOnHideEventKey(id))
})

safeExecute(path, 'onHide')
eventCenter.trigger(getOnHideEventKey(id))
},
onPullDownRefresh () {
const path = getPath(id, this.options)
Expand Down

0 comments on commit 1dca00b

Please sign in to comment.