Skip to content

Commit

Permalink
chore(taro): 更新一些类型定义的注释
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfield550 committed Oct 25, 2019
1 parent a552264 commit 21deb60
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions packages/taro/types/taro.lifecycle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@ declare namespace Taro {
interface ShareAppMessageObject {
/**
* 转发事件来源
* `button`:页面内转发按钮
* `menu`:右上角转发菜单
*
* @since 1.2.4
*/
from?: string
from?: 'button' | 'menu' | string
/**
* 如果 from 值是 button,则 target 是触发这次转发事件的 button,否则为 undefined
* 如果 `from` 值是 `button`,则 `target` 是触发这次转发事件的 `button`,否则为 `undefined`
*
* @since 1.2.4
*/
target?: object
/**
* 页面中包含<web-view>组件时,返回当前<web-view>的url
* 页面中包含 `<web-view>` 组件时,返回当前 `<web-view>` 的 url
*
* @since 1.6.4
*/
webViewUrl?: string
}
Expand All @@ -53,23 +61,32 @@ declare namespace Taro {
* 自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径
* 支持PNG及JPG
* 显示图片长宽比是 5:4
* 默认使用截图
*
* @since 1.5.0
*/
imageUrl?: string
}

interface TabItemTapObject {
/**
* 被点击tabItem的序号,从0开始
*
* @since 1.9.0
*/
index: string

/**
* 被点击tabItem的页面路径
*
* @since 1.9.0
*/
pagePath: string

/**
* 被点击tabItem的按钮文字
*
* @since 1.9.0
*/
text: string
}
Expand Down

0 comments on commit 21deb60

Please sign in to comment.