mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 19:50:05 +08:00
commit
c87c37329c
20
components/datepicker/demo/size.md
Normal file
20
components/datepicker/demo/size.md
Normal file
@ -0,0 +1,20 @@
|
||||
# 三种大小
|
||||
|
||||
- order: 1
|
||||
|
||||
三种大小的输入框,`size`为`lg`和`sm`分别表示高为`32px`和`22px`,默认`28px`。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
// or require('antd/lib/datepicker');
|
||||
var Datepicker = antd.Datepicker;
|
||||
|
||||
React.render(
|
||||
<div>
|
||||
<Datepicker size="sm" value="" />
|
||||
<Datepicker value="" />
|
||||
<Datepicker size="lg" value="" />
|
||||
</div>
|
||||
, document.getElementById('components-datepicker-demo-size'));
|
||||
````
|
@ -74,7 +74,7 @@ export default React.createClass({
|
||||
value={this.state.value}
|
||||
prefixCls="ant-calendar-picker"
|
||||
onChange={this.handleChange}>
|
||||
<input placeholder={this.props.placeholder} className="ant-calendar-picker-input ant-input" />
|
||||
<input placeholder={this.props.placeholder} className={'ant-calendar-picker-input ant-input ant-input-' + this.props.size}/>
|
||||
</Datepicker>
|
||||
);
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
| onSelect | 选择日期的回调 | function | 无 |
|
||||
| showTime | 显示时间选择条 | boolean | false |
|
||||
| disabled | 禁用 | bool | false |
|
||||
| size | 输入框大小,`lg`代表高为32px,`sm`代表高为22px,默认28px | string | 无 |
|
||||
|
||||
<style>
|
||||
.code-box-demo .ant-calendar-picker-input {
|
||||
|
Loading…
Reference in New Issue
Block a user