You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
335 B
22 lines
335 B
9 years ago
|
# 基本
|
||
9 years ago
|
|
||
|
- order: 0
|
||
|
|
||
|
最简单的用法。
|
||
|
|
||
|
---
|
||
|
|
||
|
````jsx
|
||
9 years ago
|
import { TimePicker } from 'antd';
|
||
9 years ago
|
|
||
9 years ago
|
function onChange(time) {
|
||
9 years ago
|
if (time) {
|
||
9 years ago
|
console.log(time.toLocaleTimeString('zh-CN', { hour12: false }));
|
||
9 years ago
|
}
|
||
9 years ago
|
}
|
||
|
|
||
9 years ago
|
ReactDOM.render(
|
||
9 years ago
|
<TimePicker onChange={onChange} />
|
||
|
, document.getElementById('components-time-picker-demo-basic'));
|
||
9 years ago
|
````
|