mirror of https://github.com/ElemeFE/element
Chore: update input docs
parent
79cc629f93
commit
bc14458249
|
@ -647,6 +647,7 @@ Search data from server-side.
|
||||||
|maxlength| maximum Input text length| number| — | — |
|
|maxlength| maximum Input text length| number| — | — |
|
||||||
|minlength| minimum Input text length| number | — | — |
|
|minlength| minimum Input text length| number | — | — |
|
||||||
|placeholder| placeholder of Input| string | — | — |
|
|placeholder| placeholder of Input| string | — | — |
|
||||||
|
| clearable | whether to show clear button | boolean | — | false |
|
||||||
|disabled | whether Input is disabled | boolean | — | false |
|
|disabled | whether Input is disabled | boolean | — | false |
|
||||||
|size | size of Input, works when `type` is not 'textarea' | string | medium / small / mini | — |
|
|size | size of Input, works when `type` is not 'textarea' | string | medium / small / mini | — |
|
||||||
| prefix-icon | prefix icon class | string | — | — |
|
| prefix-icon | prefix icon class | string | — | — |
|
||||||
|
@ -663,7 +664,6 @@ Search data from server-side.
|
||||||
|autofocus | same as `autofocus` in native input | boolean | — | false |
|
|autofocus | same as `autofocus` in native input | boolean | — | false |
|
||||||
|form | same as `form` in native input | string | — | — |
|
|form | same as `form` in native input | string | — | — |
|
||||||
| label | label text | string | — | — |
|
| label | label text | string | — | — |
|
||||||
| clearable | whether to show clear button | boolean | — | false |
|
|
||||||
|
|
||||||
### Input slots
|
### Input slots
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
input7: '',
|
input7: '',
|
||||||
input8: '',
|
input8: '',
|
||||||
input9: '',
|
input9: '',
|
||||||
|
input10: '',
|
||||||
textarea: '',
|
textarea: '',
|
||||||
textarea2: '',
|
textarea2: '',
|
||||||
textarea3: '',
|
textarea3: '',
|
||||||
|
@ -224,6 +225,29 @@ export default {
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
### 可清空
|
||||||
|
|
||||||
|
::: demo 使用`clearable`属性即可得到一个可清空的输入框
|
||||||
|
|
||||||
|
```html
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="input10"
|
||||||
|
clearable>
|
||||||
|
</el-input>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
input10: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
### 带 icon 的输入框
|
### 带 icon 的输入框
|
||||||
|
|
||||||
带有图标标记输入类型
|
带有图标标记输入类型
|
||||||
|
@ -779,6 +803,7 @@ export default {
|
||||||
| maxlength | 最大输入长度 | number | — | — |
|
| maxlength | 最大输入长度 | number | — | — |
|
||||||
| minlength | 最小输入长度 | number | — | — |
|
| minlength | 最小输入长度 | number | — | — |
|
||||||
| placeholder | 输入框占位文本 | string | — | — |
|
| placeholder | 输入框占位文本 | string | — | — |
|
||||||
|
| clearable | 是否可清空 | boolean | — | false |
|
||||||
| disabled | 禁用 | boolean | — | false |
|
| disabled | 禁用 | boolean | — | false |
|
||||||
| size | 输入框尺寸,只在 `type!="textarea"` 时有效 | string | medium / small / mini | — |
|
| size | 输入框尺寸,只在 `type!="textarea"` 时有效 | string | medium / small / mini | — |
|
||||||
| prefix-icon | 输入框头部图标 | string | — | — |
|
| prefix-icon | 输入框头部图标 | string | — | — |
|
||||||
|
|
Loading…
Reference in New Issue