2015-11-13 18:20:22 +08:00
|
|
|
# 卡片模式
|
2015-11-11 00:15:12 +08:00
|
|
|
|
2015-11-13 19:56:34 +08:00
|
|
|
- order: 10
|
2015-11-11 00:15:12 +08:00
|
|
|
|
2015-11-13 18:20:22 +08:00
|
|
|
用于嵌套在空间有限的容器中。
|
2015-11-11 00:15:12 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Calendar } from 'antd';
|
|
|
|
|
2015-11-13 18:20:22 +08:00
|
|
|
function onChange(value) {
|
2015-11-13 19:56:34 +08:00
|
|
|
console.log(value);
|
2015-11-13 18:20:22 +08:00
|
|
|
}
|
2015-11-11 00:15:12 +08:00
|
|
|
|
2015-11-13 18:20:22 +08:00
|
|
|
ReactDOM.render(
|
|
|
|
<div style={{ width: 290, border: '1px solid #d9d9d9', borderRadius: 4 }}>
|
2015-11-13 19:56:34 +08:00
|
|
|
<Calendar fullscreen={false} type="date" onChange={onChange} />
|
2015-11-13 18:20:22 +08:00
|
|
|
</div>
|
|
|
|
, document.getElementById('components-calendar-demo-card'));
|
|
|
|
````
|
2015-11-13 19:56:34 +08:00
|
|
|
|