Skip to content

Commit

Permalink
feat(taro-components): camera 组件增加 onInitDone 回调,close #4139
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Aug 12, 2019
1 parent 1f51650 commit 8007465
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/taro-components/types/Camera.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface CameraProps extends StandardProps {
/**
* 模式,有效值为normal, scanCode
* 默认值:`normal`
* 最低版本:2.1.0
* 最低版本:微信小程序 2.1.0
*/
mode?: 'normal' | 'scanCode'

Expand Down Expand Up @@ -46,9 +46,15 @@ export interface CameraProps extends StandardProps {
/**
* 在成功识别到一维码时触发,
* 仅在 mode="scanCode" 时生效
* 最低版本:2.1.0
* 最低版本:微信小程序 2.1.0
*/
onScanCode?: CommonEventFunction

/**
* 相机初始化完成时触发
* 最低版本:微信小程序 2.7.0
*/
onInitDone?: CommonEventFunction
}

declare const Camera: ComponentType<CameraProps>
Expand Down

0 comments on commit 8007465

Please sign in to comment.