-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(checkbox): upadte group props file
- Loading branch information
Showing
7 changed files
with
139 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdCheckboxGroupProps } from './type'; | ||
const props: TdCheckboxGroupProps = { | ||
/** 自定义组件样式 */ | ||
customStyle: { | ||
type: String, | ||
value: '', | ||
}, | ||
/** 是否禁用组件 */ | ||
disabled: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
/** 支持最多选中的数量 */ | ||
max: { | ||
type: Number, | ||
value: undefined, | ||
}, | ||
/** 统一设置内部复选框 HTML 属性 */ | ||
name: { | ||
type: String, | ||
value: '', | ||
}, | ||
/** 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」 */ | ||
options: { | ||
type: Array, | ||
value: [], | ||
}, | ||
/** 选中值 */ | ||
value: { | ||
type: Array, | ||
value: null, | ||
}, | ||
/** 选中值,非受控属性 */ | ||
defaultValue: { | ||
type: Array, | ||
value: [], | ||
}, | ||
}; | ||
|
||
export default props; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
export interface TdCheckboxGroupProps { | ||
/** | ||
* 自定义组件样式 | ||
* @default '' | ||
*/ | ||
customStyle?: { | ||
type: StringConstructor; | ||
value?: string; | ||
}; | ||
/** | ||
* 是否禁用组件 | ||
* @default false | ||
*/ | ||
disabled?: { | ||
type: BooleanConstructor; | ||
value?: boolean; | ||
}; | ||
/** | ||
* 支持最多选中的数量 | ||
*/ | ||
max?: { | ||
type: NumberConstructor; | ||
value?: number; | ||
}; | ||
/** | ||
* 统一设置内部复选框 HTML 属性 | ||
* @default '' | ||
*/ | ||
name?: { | ||
type: StringConstructor; | ||
value?: string; | ||
}; | ||
/** | ||
* 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」 | ||
* @default [] | ||
*/ | ||
options?: { | ||
type: ArrayConstructor; | ||
value?: Array<CheckboxOption>; | ||
}; | ||
/** | ||
* 选中值 | ||
* @default [] | ||
*/ | ||
value?: { | ||
type: ArrayConstructor; | ||
value?: CheckboxGroupValue; | ||
}; | ||
/** | ||
* 选中值,非受控属性 | ||
* @default [] | ||
*/ | ||
defaultValue?: { | ||
type: ArrayConstructor; | ||
value?: CheckboxGroupValue; | ||
}; | ||
} | ||
|
||
export type CheckboxOption = string | number | CheckboxOptionObj; | ||
|
||
export interface CheckboxOptionObj { | ||
label?: string; | ||
value?: string | number; | ||
disabled?: boolean; | ||
checkAll?: true; | ||
} | ||
|
||
export type CheckboxGroupValue = Array<string | number>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters