时间输入框
@astryxdesign/core v0.7.1 · TimeInput
TimeInput 属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
v-model | string | null | null | ISO 时间,HH:MM 或 HH:MM:SS。 |
label | string | — | 必填。无障碍名称。 |
hourFormat | '12h' | '24h' | '12h' | 显示格式。模型值始终是 24 小时 ISO。 |
hasSeconds | boolean | false | 值里保留秒。 |
increment | number | 1 | 方向键每次增减的分钟数。 |
min | string | — | 最早的 ISO 时间。 |
max | string | — | 最晚的 ISO 时间。 |
presentation | 'text-input' | 'native' | 'adaptive-native' | 'adaptive-bottom-sheet' | 'popover' | 'bottom-sheet' | 'adaptive-native' | 文本框、系统时间控件,或底部时分滚轮。不传时细指针用文本框,粗指针用系统控件。adaptive-bottom-sheet 只在粗指针上用滚轮;bottom-sheet 始终用滚轮。有秒、步进不是 1,或设了预设间隔时,系统控件退回文本框,滚轮不受影响。显式值压过 nativePicker。 |
isLabelHidden | boolean | false | 视觉上隐藏标签,读屏仍然读得到。旧名 labelHidden 同样可用,两者任一为真就隐藏。 |
containerClass | string | object | array | — | 加到字段外壳的 class。在 InputGroup 和横向标签的 FormLayout 里没有外壳,此时不生效,开发环境会警告。 |
containerStyle | StyleValue | — | 加到字段外壳的行内样式。落点规则同 containerClass。 |
controlClass | string | object | array | — | 加到带边框本体的 class。直接写在组件上的 class 也落在本体,不会落到内部输入框上。 |
controlStyle | StyleValue | — | 加到带边框本体的行内样式。 |
hasClear | boolean | false | 显示清除按钮。 |
size | 'sm' | 'md' | 'lg' | 'md' | 字段高度。 |
status | FieldStatusInput | — | 错误、警告或成功。 |
statusVariant | 'attached' | 'detached' | 'tooltip' | 'attached' | 状态消息的位置。 |
isDisabled | boolean | false | 禁用字段。 |
disabledMessage | string | — | 禁用原因。和 isDisabled 一起用时,悬停或键盘聚焦会显示这段提示,输入框仍可聚焦(带 aria-disabled),但改不了值。 |
isLoading | boolean | false | 字段不可改,并显示加载指示。 |
loadingLabel | string | 加载中 | 加载指示的读屏文本。 |
labelTooltip | string | — | 标签末尾信息图标里的说明。 |
placeholder | string | 选择时间 | 空值文案。聚焦且为空时,改成格式提示。 |