Skip to content

Commit

Permalink
style(Checkbox):修复勾选框和label没水平对齐问题 (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Apr 1, 2022
1 parent fab5946 commit 44cde18
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/react-checkbox/src/style/index.less
Expand Up @@ -80,6 +80,6 @@
padding-left: 4px;
margin-right: 5px;
font-size: 14px;
line-height: 14px;
// line-height: 14px;
}
}
22 changes: 10 additions & 12 deletions packages/react-date-input/README.md
Expand Up @@ -32,26 +32,24 @@ function Demo () {

return (
<div>
<Row gutter={10} style={{ maxWidth: 360,marginBottom:10 }}>
<Col fixed>
<Row style={{ marginBottom:10 }}>
<Col style={{ width: 200 }} fixed>
<DateInput
value={new Date()}
datePickerProps={{ todayButton: '今天' }}
onChange={onChange}
/>
</Col>
<Col>
<Col style={{ width: 200, marginLeft: 10 }} fixed>
<DateInput
value={new Date()}
disabled
onChange={onChange}
/>
</Col>
</Row>
<Row gutter={10}>
<Col>
<Col style={{ width: 400, marginLeft: 10 }} fixed>
<DateInputRange
bodyStyle={{width:350}}
bodyStyle={{ width: 400 }}
format="YYYY/MM/DD HH:mm:ss"
value={dataRange}
datePickerProps={{ todayButton: '今天',showTime:true }}
Expand Down Expand Up @@ -120,10 +118,10 @@ function Demo(){
{({ fields, state, canSubmit }) => {
return (
<div>
<Row gutter={10}>
<Col fixed>{fields.date}</Col>
<Row>
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
</Row>
<Row gutter={10}>
<Row style={{ width: 200 }} >
<Col fixed>{fields.dateRange}</Col>
</Row>
<Row gutter={10}>
Expand Down Expand Up @@ -157,7 +155,7 @@ class Demo extends React.Component {
}
render() {
return (
<div style={{ maxWidth: 200 }}>
<div style={{ width: 200 }}>
<DateInput
format="YYYY # MM # DD"
datePickerProps={{ todayButton: '今天' }}
Expand All @@ -184,7 +182,7 @@ class Demo extends React.Component {
}
render() {
return (
<div style={{ maxWidth: 200 }}>
<div style={{ width: 200 }}>
<DateInput
format="YYYY/MM/DD HH:mm:ss"
datePickerProps={{ showTime: true, todayButton: '今天' }}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-month-picker/README.md
Expand Up @@ -28,10 +28,10 @@ const Demo = () => {
}
return (
<Row gutter={10}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<MonthPicker size="large" onChange={onChange} placeholder="Select month" />
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<MonthPicker disabled value={formatDate} placeholder="Select month" />
</Col>
</Row>
Expand Down Expand Up @@ -75,7 +75,7 @@ const Demo = () => (
{({ fields, state, canSubmit }) => {
return (
<Row gutter={10}>
<Col fixed>{fields.date}</Col>
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
<Col>
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
</Col>
Expand All @@ -101,4 +101,4 @@ ReactDOM.render(<Demo />, _mount_);
| pickerCaptionProps | 将参数传递给内部 [`<DatePicker>`](#/components/date-picker) `PickerCaption` 组件 | [`PickerCaptionProps`](https://github.com/uiwjs/uiw/blob/207c787ed478ffb7205ecdf95754ad2c97bb69c9/packages/react-date-picker/src/DatePickerCaption.tsx#L18-L23) | - |
| disabled | 组件 [`<Input>`](#/components/input) 的属性,禁用日历 | Boolean | - |

更多属性文档请参考 [`<Input>`](#/components/input)
更多属性文档请参考 [`<Input>`](#/components/input)
32 changes: 16 additions & 16 deletions packages/react-time-picker/README.md
Expand Up @@ -22,17 +22,17 @@ import { TimePicker, Row, Col } from 'uiw';

const Demo = () => (
<Row gutter={10}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker
onChange={(formatDate, date) => {
console.log('--->', formatDate, date);
}}
/>
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker format="HH:mm" precision="minute" />
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker format="HH" precision="hour" />
</Col>
</Row>
Expand All @@ -51,13 +51,13 @@ const Demo = () => {
const value = new Date(2018, 1, 24, 4,5,35);
return (
<Row gutter={10}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker value={value} />
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker value={value} format="HH:mm" precision="minute" />
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker value={value} format="HH" precision="hour" />
</Col>
</Row>
Expand All @@ -77,15 +77,15 @@ const Demo = () => {
const value = new Date(2018, 1, 24, 4,5,35);
return (
<Row gutter={10}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker size="small" value={value} />
</Col>
<Col fixed>
<TimePicker size="large" value={value} format="HH:mm" precision="minute" />
</Col>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker value={value} format="HH" precision="hour" />
</Col>
<Col style={{ width: 200 }} fixed>
<TimePicker size="large" value={value} format="HH:mm" precision="minute" />
</Col>
</Row>
)
}
Expand Down Expand Up @@ -129,7 +129,7 @@ const Demo = () => (
{({ fields, state, canSubmit }) => {
return (
<Row gutter={10}>
<Col fixed>{fields.date}</Col>
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
<Col>
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
</Col>
Expand All @@ -153,7 +153,7 @@ import { TimePicker, Row, Col } from 'uiw';

const Demo = () => (
<Row gutter={10} style={{ maxWidth: 360 }}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker
disabledMinutes={(minute, type) => {
if (minute % 15 !== 0) {
Expand All @@ -168,7 +168,7 @@ const Demo = () => (
}}
/>
</Col>
<Col>
<Col style={{ width: 200 }} fixed>
<TimePicker disabled value={new Date(2018, 1, 24, 4,5,35)} />
</Col>
</Row>
Expand All @@ -187,7 +187,7 @@ import { TimePicker, Row, Col } from 'uiw';

const Demo = () => (
<Row gutter={10} style={{ maxWidth: 360 }}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker
hideDisabled
disabledMinutes={(minute, type) => {
Expand Down Expand Up @@ -219,7 +219,7 @@ import { TimePicker, Row, Col } from 'uiw';

const Demo = () => (
<Row gutter={10} style={{ maxWidth: 360 }}>
<Col fixed>
<Col style={{ width: 200 }} fixed>
<TimePicker
hideDisabled
disabledMinutes={(minute, date) => {
Expand Down

0 comments on commit 44cde18

Please sign in to comment.