mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 11:17:38 +08:00
fix input type
This commit is contained in:
parent
0f7158ab78
commit
cfed2184bc
@ -200,7 +200,6 @@
|
||||
```html
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
:number="true"
|
||||
v-model="input">
|
||||
</el-input>
|
||||
```
|
||||
@ -636,7 +635,6 @@
|
||||
| disabled | 禁用 | boolean | — | false |
|
||||
| size | 输入框尺寸,只在 `type!="textarea"` 时有效 | string | large, small, mini | — |
|
||||
| icon | 输入框尾部图标 | string | — | — |
|
||||
| number | 指定 model 值为 number 类型 | boolean | — | false |
|
||||
| rows | 输入框行数,只对 `type="textarea"` 有效 | number | — | 2 |
|
||||
| autosize | 自适应内容高度,只对 `type="textarea"` 有效,可传入对象,如,{ minRows: 2, maxRows: 6 } | boolean/object | — | false |
|
||||
|
||||
|
@ -13,27 +13,9 @@
|
||||
<slot name="prepend"></slot>
|
||||
</div>
|
||||
<input
|
||||
v-if="type === 'text'"
|
||||
v-if="type !== 'textarea'"
|
||||
class="el-input__inner"
|
||||
v-model="currentValue"
|
||||
type="text"
|
||||
:name="name"
|
||||
:placeholder="placeholder"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
:number="number"
|
||||
:maxlength="maxlength"
|
||||
:minlength="minlength"
|
||||
:autocomplete="autoComplete"
|
||||
ref="input"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'password'"
|
||||
class="el-input__inner"
|
||||
v-model="currentValue"
|
||||
type="password"
|
||||
:type="type"
|
||||
:name="name"
|
||||
:placeholder="placeholder"
|
||||
:disabled="disabled"
|
||||
@ -42,7 +24,9 @@
|
||||
:maxlength="maxlength"
|
||||
:minlength="minlength"
|
||||
:autocomplete="autoComplete"
|
||||
:value="value"
|
||||
ref="input"
|
||||
@input="handleInput"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
>
|
||||
@ -151,6 +135,9 @@
|
||||
},
|
||||
handleFocus(ev) {
|
||||
this.$emit('focus', ev);
|
||||
},
|
||||
handleInput(ev) {
|
||||
this.currentValue = ev.target.value;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user