外观
Input 单行输入框
输入邮箱、名称、搜索词等单行内容,保留浏览器原生输入行为。
import { SInput } from '@icecreamqaq/shadcn/input'使用示例
常用 API
| 成员 | 类型 | 用法 |
|---|---|---|
SInput.v-model | string | number | 绑定输入值,编辑时触发 update:modelValue。 |
SInput.defaultValue | string | number | 设置初始输入内容。 |
SInput.type | HTMLInputElement.type | 支持 email、search、password 等原生类型,默认按文本输入处理。 |
SInput.aria-invalid | boolean | 将校验结果传给辅助技术,并切换错误边框样式。 |
完整 API
Input4 个成员
属性
| 名称 | 类型 |
|---|---|
defaultValue | string | number |
modelValue | string | number |
class | ClassValue |
事件
| 名称 | 类型 |
|---|---|
update:modelValue | ((payload: string | number) => any) |
分组导出
模板标签为 <s-input>。
组件 SInput