Skip to content

Commit

Permalink
updaet index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
xunge0613 committed Jun 11, 2020
1 parent c3c39cb commit 427bb12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @desc 类型声明
*/
import { ColumnProps } from 'antd/lib/table'
import { FormInstance } from 'antd/lib/form';

declare namespace AntdUtils {
/**
Expand All @@ -23,11 +24,20 @@ declare namespace AntdUtils {

/**
* select tags 兼容复制操作,逗号分隔
* @param value
* @param form
* @param keyName
* @description paste or input string with ',' into <Select> in tags mode
* @param value onChange(value)
* @param form the form instance
* @param keyName the Form.Item name
*/
export function pasteTags(value: string[], form: FormInstance, keyName: string)

/**
* enum2options
* @description Convert TS enum into Select.Options
* @param object enum value
* @returns [] options
*/
export function enum2Options(enumObj: object, labelName: string = 'label', valueName: string = 'value')
}

export = AntdUtils;
2 changes: 1 addition & 1 deletion src/select/enum2options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* enum2option
* enum2options
* @description Convert TS enum into Select.Options
* @param object enum value
* @returns [] options
Expand Down

0 comments on commit 427bb12

Please sign in to comment.