docs: update input doc (#14437)

pull/14451/head
iamkun 2019-02-22 16:40:35 +08:00 committed by hetech
parent 8608dbf800
commit 3459a5218d
4 changed files with 109 additions and 0 deletions

View File

@ -17,6 +17,7 @@
input8: '',
input9: '',
input10: '',
input11: '',
textarea: '',
textarea2: '',
textarea3: '',
@ -212,6 +213,25 @@ export default {
```
:::
### Password box
:::demo Make a toggleable password Input with the `show-password` attribute.
```html
<el-input placeholder="Please input password" v-model="input11" show-password></el-input>
<script>
export default {
data() {
return {
input11: ''
}
}
}
</script>
```
:::
### Input with icon
Add an icon to indicate input type.
@ -648,6 +668,7 @@ Search data from server-side.
|minlength| same as `minlength` in native input | number | — | — |
|placeholder| placeholder of Input| string | — | — |
| clearable | whether to show clear button | boolean | — | false |
| show-password | whether to show toggleable password input| boolean | — | false |
|disabled | whether Input is disabled | boolean | — | false |
|size | size of Input, works when `type` is not 'textarea' | string | medium / small / mini | — |
| prefix-icon | prefix icon class | string | — | — |

View File

@ -16,6 +16,8 @@
input7: '',
input8: '',
input9: '',
input10: '',
input11: '',
textarea: '',
textarea2: '',
textarea3: '',
@ -190,6 +192,48 @@ export default {
:::
### Clearable
:::demo Make the Input clearable with the `clearable` attribute.
```html
<el-input
placeholder="Please input"
v-model="input10"
clearable>
</el-input>
<script>
export default {
data() {
return {
input10: ''
}
}
}
</script>
```
:::
### Password box
:::demo Make a toggleable password Input with the `show-password` attribute.
```html
<el-input placeholder="Please input password" v-model="input11" show-password></el-input>
<script>
export default {
data() {
return {
input11: ''
}
}
}
</script>
```
:::
### Input con icono
Añada un icono para indicar el tipo de Input.
@ -638,6 +682,8 @@ Búsqueda de datos desde el servidor.
| maxlength | igual que `maxlength` en el input nativo | number | — | — |
| minlength | igual que `minlength` en el input nativo | number | — | — |
| placeholder | placeholder del Input | string | — | — |
| clearable | whether to show clear button | boolean | — | false |
| show-password | whether to show toggleable password input| boolean | — | false |
| disabled | si esta deshabilitado | boolean | — | false |
| size | tamaño del input, esto no funciona cuando `type` no es textarea | string | medium / small / mini | — |
| prefix-icon | clase del icono de prefijo | string | — | — |

View File

@ -17,6 +17,7 @@
input8: '',
input9: '',
input10: '',
input11: '',
textarea: '',
textarea2: '',
textarea3: '',
@ -212,6 +213,25 @@ export default {
```
:::
### Password box
:::demo Make a toggleable password Input with the `show-password` attribute.
```html
<el-input placeholder="Please input password" v-model="input11" show-password></el-input>
<script>
export default {
data() {
return {
input11: ''
}
}
}
</script>
```
:::
### Input avec icône
Ajoutez une icône pour indiquer le type d'input.
@ -648,6 +668,7 @@ Vous pouvez aller chercher des infos de suggestions sur un serveur distant.
| minlength| Identique à `minlength` dans l'input natif. | number | — | — |
| placeholder| Placeholder de l' Input. | string | — | — |
| clearable | Si le bouton de reset apparaît. | boolean | — | false |
| show-password | whether to show toggleable password input| boolean | — | false |
| disabled | Si le champs est désactivé. | boolean | — | false |
| size | Taille du champ, marche quand `type` n'est pas 'textarea'. | string | medium / small / mini | — |
| prefix-icon | Classe de l'icône de préfixe. | string | — | — |

View File

@ -17,6 +17,7 @@
input8: '',
input9: '',
input10: '',
input11: '',
textarea: '',
textarea2: '',
textarea3: '',
@ -248,6 +249,25 @@ export default {
```
:::
### 密码框
:::demo 使用`show-password`属性即可得到一个可切换显示隐藏的密码框
```html
<el-input placeholder="请输入密码" v-model="input11" show-password></el-input>
<script>
export default {
data() {
return {
input11: ''
}
}
}
</script>
```
:::
### 带 icon 的输入框
带有图标标记输入类型
@ -804,6 +824,7 @@ export default {
| minlength | 原生属性,最小输入长度 | number | — | — |
| placeholder | 输入框占位文本 | string | — | — |
| clearable | 是否可清空 | boolean | — | false |
| show-password | 是否显示切换密码图标| boolean | — | false |
| disabled | 禁用 | boolean | — | false |
| size | 输入框尺寸,只在 `type!="textarea"` 时有效 | string | medium / small / mini | — |
| prefix-icon | 输入框头部图标 | string | — | — |