Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
cfed2184
Commit
cfed2184
authored
Oct 17, 2016
by
baiyaaaaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix input type
parent
0f7158ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
22 deletions
+7
-22
examples/docs/zh-cn/input.md
examples/docs/zh-cn/input.md
+0
-2
packages/input/src/input.vue
packages/input/src/input.vue
+7
-20
No files found.
examples/docs/zh-cn/input.md
View file @
cfed2184
...
...
@@ -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 |
...
...
packages/input/src/input.vue
View file @
cfed2184
...
...
@@ -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
;
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment