Skip to content

Commit

Permalink
fix(types): 表单组件props属性完善 Picker组件属性完善 (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
JianYe authored and yuche committed Dec 14, 2018
1 parent 7a7fdb0 commit a5ccded
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
8 changes: 2 additions & 6 deletions packages/taro-components/types/Checkbox.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { ComponentType } from 'react'
import { StandardProps, BaseEventFunction } from './common'
import { StandardProps, BaseEventFunction, FormItemProps } from './common'

interface CheckboxGroupProps extends StandardProps {
/**
* 表单组件中加上 name 来作为 key
*/
name: string;
interface CheckboxGroupProps extends StandardProps, FormItemProps {
/**
* <checkbox-group/>中选中项发生改变是触发 change 事件
*
Expand Down
2 changes: 0 additions & 2 deletions packages/taro-components/types/Input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ interface InputProps extends StandardProps, FormItemProps {
* event.detail = {value: value}
*/
onConfirm?: BaseEventFunction

name?: string
}

declare const Input: ComponentType<InputProps>
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components/types/Picker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ interface PickerRegionProps extends PickerStandardProps {
/**
* 仅当 mode = region 时有效,可为每一列的顶部添加一个自定义的项
*/
customItem: string
customItem?: string
}

declare const Picker: ComponentType<
Expand Down
8 changes: 2 additions & 6 deletions packages/taro-components/types/Radio.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { ComponentType } from 'react'
import { StandardProps, BaseEventFunction } from './common'
import { StandardProps, BaseEventFunction, FormItemProps } from './common'

interface RadioGroupProps extends StandardProps {
/**
* 表单组件中加上 name 来作为 key
*/
name: string;
interface RadioGroupProps extends StandardProps, FormItemProps {
onChange?: BaseEventFunction
}

Expand Down

0 comments on commit a5ccded

Please sign in to comment.