Skip to content

TimeSelect 时间选择

TimeSelect 时间选择器用于从预定义的时间列表中选择时间,适用于需要限制用户只能选择特定时间点的场景。

引入

typescript
import { TimeSelect } from '@versakit/vue'

使用

loading

API

属性

属性名说明类型默认值
modelValue绑定值,选中的时间string-
disabled是否禁用booleanfalse
readonly是否只读booleanfalse
placeholder占位文本string'选择时间'
options可选时间选项列表string[]-
start开始时间,格式为 HH:mmstring'00:00'
end结束时间,格式为 HH:mmstring'23:59'
step时间间隔,单位为分钟number30
format时间格式'12h' | '24h''24h'
clearable是否可清空booleantrue
unstyled是否禁用默认样式booleanfalse
pt自定义样式配置TimeSelectPT-

事件

事件名说明回调参数
update:modelValue选中时间变化时触发(value: string | null) => void
change选中时间变化时触发(value: string | null) => void
focus输入框获得焦点时触发(e: FocusEvent) => void
blur输入框失去焦点时触发(e: FocusEvent) => void
clear点击清空按钮时触发() => void

插槽

TimeSelect 组件暂不提供插槽。