This commit is contained in:
oneao committed 2026-10-09 22:05:02 +08:00
1 parent 0be0b0767a
commit 5f28a10d89
852 files changed
+8962 -111755

No files matched your search

@@ -43,7 +43,7 @@ description: 单行 / 密码 / 数字 / 多行四种模式,支持清除、前
## 可清除
`allowClear` 时,有值且 hover / 聚焦会出现清除按钮;点击清空值并触发 `clear` 事件。
`clearable` 时,有值且 hover / 聚焦会出现清除按钮;点击清空值并触发 `clear` 事件。
<demo vue="input/clearable.vue" />
@@ -83,7 +83,8 @@ inputRef.value?.focus({ preventScroll: true }) // 聚焦但不滚动页面
| `disabled` | `boolean` | `false` | 禁用态 |
| `readonly` | `boolean` | `false` | 只读态:可聚焦、可复制,但不可修改 |
| `status` | `'' \| 'error' \| 'warning'` | `''` | 校验状态 |
| `allowClear` | `boolean` | `false` | 有值时显示清除按钮(hover / 聚焦时出现),多行模式不支持 |
| `clearable` | `boolean` | `false` | 有值时显示清除按钮(hover / 聚焦时出现),多行模式不支持 |
| `allowClear` | `boolean` | — | **已废弃**,改用 `clearable`(与 Select / DatePicker 统一);保留仅为兼容旧代码 |
| `showCount` | `boolean` | `false` | 显示字数统计(`maxlength` 存在时显示 `当前 / 上限`) |
| `maxlength` | `string \| number` | — | 最大长度,透传给原生 `maxlength` |
| `rows` | `string \| number` | `3` | 多行模式的初始行数(仅 `textarea` 生效) |
@@ -127,7 +128,8 @@ export interface InputProps {
disabled?: boolean
readonly?: boolean
status?: InputStatus
allowClear?: boolean
clearable?: boolean
allowClear?: boolean // 已废弃,改用 clearable
showCount?: boolean
maxlength?: string | number
rows?: string | number
@@ -82,6 +82,7 @@ description: 下拉选择,支持筛选、多选、远程搜索、触底加载
| `filterOption` | `(input: string, option: unknown) => boolean` | — | 自定义筛选函数,`option` 是**原始**选项对象 |
| `remote` | `boolean` | `false` | 远程搜索模式:不做本地筛选,输入时触发 `search` |
| `loading` | `boolean` | `false` | 加载中:右侧显示加载图标,并阻止触底重复触发 |
| `placeholder` | `string` | 语言包 | 无值时的占位文案(不传取 `common.selectPlaceholder`,即「请选择」) |
| `notFoundText` | `string` | 语言包 | 无匹配项时的文案 |
| `allowFreeInput` | `boolean` | `false` | 允许自由输入:不在列表里的文本也可以作为值提交 |
| `labelKey` | `string` | `'label'` | 选项对象中作为显示文本的字段名 |