npm install vue-pc-timepicker -save
import timePicker from 'vue-pc-timepicker'
Vue.use(timePicker);
<timePicker :options="timePickerOptions"></timePicker>
let timePickerOptions = {
time: '2:00', // 默认显示的时间
success: (val) => {
console.log(val); // val是返回的时间
}
}
Options | Type | Description | Default | Result |
---|---|---|---|---|
success | function | 时间弹窗消失后执行 | undefined | 返回时间为00:00格式 |
time | string | 默认显示时间 | 00:00 |