Skip to content

Commit 44cde18

Browse files
authoredApr 1, 2022
style(Checkbox):修复勾选框和label没水平对齐问题 (#735)
1 parent fab5946 commit 44cde18

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed
 

‎packages/react-checkbox/src/style/index.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@
8080
padding-left: 4px;
8181
margin-right: 5px;
8282
font-size: 14px;
83-
line-height: 14px;
83+
// line-height: 14px;
8484
}
8585
}

‎packages/react-date-input/README.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,24 @@ function Demo () {
3232

3333
return (
3434
<div>
35-
<Row gutter={10} style={{ maxWidth: 360,marginBottom:10 }}>
36-
<Col fixed>
35+
<Row style={{ marginBottom:10 }}>
36+
<Col style={{ width: 200 }} fixed>
3737
<DateInput
3838
value={new Date()}
3939
datePickerProps={{ todayButton: '今天' }}
4040
onChange={onChange}
4141
/>
4242
</Col>
43-
<Col>
43+
<Col style={{ width: 200, marginLeft: 10 }} fixed>
4444
<DateInput
4545
value={new Date()}
4646
disabled
4747
onChange={onChange}
4848
/>
4949
</Col>
50-
</Row>
51-
<Row gutter={10}>
52-
<Col>
50+
<Col style={{ width: 400, marginLeft: 10 }} fixed>
5351
<DateInputRange
54-
bodyStyle={{width:350}}
52+
bodyStyle={{ width: 400 }}
5553
format="YYYY/MM/DD HH:mm:ss"
5654
value={dataRange}
5755
datePickerProps={{ todayButton: '今天',showTime:true }}
@@ -120,10 +118,10 @@ function Demo(){
120118
{({ fields, state, canSubmit }) => {
121119
return (
122120
<div>
123-
<Row gutter={10}>
124-
<Col fixed>{fields.date}</Col>
121+
<Row>
122+
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
125123
</Row>
126-
<Row gutter={10}>
124+
<Row style={{ width: 200 }} >
127125
<Col fixed>{fields.dateRange}</Col>
128126
</Row>
129127
<Row gutter={10}>
@@ -157,7 +155,7 @@ class Demo extends React.Component {
157155
}
158156
render() {
159157
return (
160-
<div style={{ maxWidth: 200 }}>
158+
<div style={{ width: 200 }}>
161159
<DateInput
162160
format="YYYY # MM # DD"
163161
datePickerProps={{ todayButton: '今天' }}
@@ -184,7 +182,7 @@ class Demo extends React.Component {
184182
}
185183
render() {
186184
return (
187-
<div style={{ maxWidth: 200 }}>
185+
<div style={{ width: 200 }}>
188186
<DateInput
189187
format="YYYY/MM/DD HH:mm:ss"
190188
datePickerProps={{ showTime: true, todayButton: '今天' }}

‎packages/react-month-picker/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const Demo = () => {
2828
}
2929
return (
3030
<Row gutter={10}>
31-
<Col fixed>
31+
<Col style={{ width: 200 }} fixed>
3232
<MonthPicker size="large" onChange={onChange} placeholder="Select month" />
3333
</Col>
34-
<Col fixed>
34+
<Col style={{ width: 200 }} fixed>
3535
<MonthPicker disabled value={formatDate} placeholder="Select month" />
3636
</Col>
3737
</Row>
@@ -75,7 +75,7 @@ const Demo = () => (
7575
{({ fields, state, canSubmit }) => {
7676
return (
7777
<Row gutter={10}>
78-
<Col fixed>{fields.date}</Col>
78+
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
7979
<Col>
8080
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
8181
</Col>
@@ -101,4 +101,4 @@ ReactDOM.render(<Demo />, _mount_);
101101
| pickerCaptionProps | 将参数传递给内部 [`<DatePicker>`](#/components/date-picker) `PickerCaption` 组件 | [`PickerCaptionProps`](https://github.com/uiwjs/uiw/blob/207c787ed478ffb7205ecdf95754ad2c97bb69c9/packages/react-date-picker/src/DatePickerCaption.tsx#L18-L23) | - |
102102
| disabled | 组件 [`<Input>`](#/components/input) 的属性,禁用日历 | Boolean | - |
103103

104-
更多属性文档请参考 [`<Input>`](#/components/input)
104+
更多属性文档请参考 [`<Input>`](#/components/input)

‎packages/react-time-picker/README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ import { TimePicker, Row, Col } from 'uiw';
2222

2323
const Demo = () => (
2424
<Row gutter={10}>
25-
<Col fixed>
25+
<Col style={{ width: 200 }} fixed>
2626
<TimePicker
2727
onChange={(formatDate, date) => {
2828
console.log('--->', formatDate, date);
2929
}}
3030
/>
3131
</Col>
32-
<Col fixed>
32+
<Col style={{ width: 200 }} fixed>
3333
<TimePicker format="HH:mm" precision="minute" />
3434
</Col>
35-
<Col fixed>
35+
<Col style={{ width: 200 }} fixed>
3636
<TimePicker format="HH" precision="hour" />
3737
</Col>
3838
</Row>
@@ -51,13 +51,13 @@ const Demo = () => {
5151
const value = new Date(2018, 1, 24, 4,5,35);
5252
return (
5353
<Row gutter={10}>
54-
<Col fixed>
54+
<Col style={{ width: 200 }} fixed>
5555
<TimePicker value={value} />
5656
</Col>
57-
<Col fixed>
57+
<Col style={{ width: 200 }} fixed>
5858
<TimePicker value={value} format="HH:mm" precision="minute" />
5959
</Col>
60-
<Col fixed>
60+
<Col style={{ width: 200 }} fixed>
6161
<TimePicker value={value} format="HH" precision="hour" />
6262
</Col>
6363
</Row>
@@ -77,15 +77,15 @@ const Demo = () => {
7777
const value = new Date(2018, 1, 24, 4,5,35);
7878
return (
7979
<Row gutter={10}>
80-
<Col fixed>
80+
<Col style={{ width: 200 }} fixed>
8181
<TimePicker size="small" value={value} />
8282
</Col>
83-
<Col fixed>
84-
<TimePicker size="large" value={value} format="HH:mm" precision="minute" />
85-
</Col>
86-
<Col fixed>
83+
<Col style={{ width: 200 }} fixed>
8784
<TimePicker value={value} format="HH" precision="hour" />
8885
</Col>
86+
<Col style={{ width: 200 }} fixed>
87+
<TimePicker size="large" value={value} format="HH:mm" precision="minute" />
88+
</Col>
8989
</Row>
9090
)
9191
}
@@ -129,7 +129,7 @@ const Demo = () => (
129129
{({ fields, state, canSubmit }) => {
130130
return (
131131
<Row gutter={10}>
132-
<Col fixed>{fields.date}</Col>
132+
<Col style={{ width: 200 }} fixed>{fields.date}</Col>
133133
<Col>
134134
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
135135
</Col>
@@ -153,7 +153,7 @@ import { TimePicker, Row, Col } from 'uiw';
153153

154154
const Demo = () => (
155155
<Row gutter={10} style={{ maxWidth: 360 }}>
156-
<Col fixed>
156+
<Col style={{ width: 200 }} fixed>
157157
<TimePicker
158158
disabledMinutes={(minute, type) => {
159159
if (minute % 15 !== 0) {
@@ -168,7 +168,7 @@ const Demo = () => (
168168
}}
169169
/>
170170
</Col>
171-
<Col>
171+
<Col style={{ width: 200 }} fixed>
172172
<TimePicker disabled value={new Date(2018, 1, 24, 4,5,35)} />
173173
</Col>
174174
</Row>
@@ -187,7 +187,7 @@ import { TimePicker, Row, Col } from 'uiw';
187187

188188
const Demo = () => (
189189
<Row gutter={10} style={{ maxWidth: 360 }}>
190-
<Col fixed>
190+
<Col style={{ width: 200 }} fixed>
191191
<TimePicker
192192
hideDisabled
193193
disabledMinutes={(minute, type) => {
@@ -219,7 +219,7 @@ import { TimePicker, Row, Col } from 'uiw';
219219

220220
const Demo = () => (
221221
<Row gutter={10} style={{ maxWidth: 360 }}>
222-
<Col fixed>
222+
<Col style={{ width: 200 }} fixed>
223223
<TimePicker
224224
hideDisabled
225225
disabledMinutes={(minute, date) => {

0 commit comments

Comments
 (0)
Please sign in to comment.