Skip to content

Commit

Permalink
fix(taro-router): 修复路由参数 path (#4921)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojongki authored and luckyadam committed Nov 26, 2019
1 parent c2e7e04 commit bef8531
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/taro/types/taro.component.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,22 @@ declare namespace Taro {
params: {
[key: string]: string
} & {
path?: string
scene?: number | string
query?: {[key: string]: string} | string
shareTicket?: string
referrerInfo?: {[key: string]: any} | string
}

/**
* 可以于 `this.$router.path` 中获取当前页面路径
*
* @example
* componentWillMount () {
* console.log(this.$router.path)
* }
*/
path?: string

/**
* 可以于 `this.$router.preload` 中访问到 `this.$preload` 传入的参数
*
Expand Down

0 comments on commit bef8531

Please sign in to comment.