timer-dialog
基于react的时分秒时间选择器
npm安装
npm install timer-dialog
组件调用
import TimerDialog from "timer-dialog";
<TimerDialog
title="时间选择器"
selectTime={value}
onChange={this.getDate}
isShow={isShow}
onClose={this.showTimer}
/>
组件配置props
名称 | 类型 | 必填 | 默认值 | 含义 |
---|---|---|---|---|
selectTime | string(hh:mm:ss) | 否 | 当前时间 | 默认选中项 |
title | string | 否 | 选择时间 | 整个时间选择器的标题 |
isShow | bool | 否 | false | 时间选择器的显示与隐藏 |
onChange | func | 否 | 无 | 时间改变后的回调,回调参数(time) |
onClose | func | 否 | 无 | 取消按钮的回调函数,可用来关闭隐藏该组件 |
className | string | 否 | 无 | 设置组件样式 |