Skip to content

Commit

Permalink
fix(*): add name and value
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Jul 31, 2019
1 parent 6adb1be commit 5beedd8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/checkbox/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ class Checkbox extends UIState {
* @param {Event} e Dom 事件对象
*/
onMouseLeave: PropTypes.func,
/**
* checkbox 的value
*/
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
/**
* name
*/
name: PropTypes.string,
};

static defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/date-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default class DatePicker extends Component {
timeInputAriaLabel: PropTypes.string,
locale: PropTypes.object,
className: PropTypes.string,
name: PropTypes.string,
};

static defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/month-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class MonthPicker extends Component {
dateInputAriaLabel: PropTypes.string,
locale: PropTypes.object,
className: PropTypes.string,
name: PropTypes.string,
};

static defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/range-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default class RangePicker extends Component {
ranges: PropTypes.object,
locale: PropTypes.object,
className: PropTypes.string,
name: PropTypes.string,
};

static defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/year-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class YearPicker extends Component {
dateInputAriaLabel: PropTypes.string,
locale: PropTypes.object,
className: PropTypes.string,
name: PropTypes.string,
};

static defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/time-picker/time-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default class TimePicker extends Component {
*/
onChange: PropTypes.func,
className: PropTypes.string,
name: PropTypes.string,
};

static defaultProps = {
Expand Down
14 changes: 12 additions & 2 deletions types/checkbox/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export interface GroupProps extends HTMLAttributesWeak, CommonProps {
/**
* 被选中的值列表
*/
value?: Array<data> | string | number;
value?: Array<string> | Array<number> | string | number;

/**
* 默认被选中的值列表
*/
defaultValue?: Array<data> | string | number;
defaultValue?: Array<string> | Array<number> | string | number;

/**
* 通过子元素方式设置内部 checkbox
Expand Down Expand Up @@ -92,6 +92,16 @@ export interface CheckboxProps extends HTMLAttributesWeak, CommonProps {
*/
checked?: boolean;

/**
* checkbox 的value
*/
value?: string | number;

/**
* name
*/
name?: string;

/**
* 默认选中状态
*/
Expand Down

0 comments on commit 5beedd8

Please sign in to comment.