Commit 731d69a29a69a249f3e447d805eacdfb413634e4
1 parent
d3dfdb26
fixed #101
Input add name props
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
src/components/input/input.vue
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | :disabled="disabled" |
11 | 11 | :maxlength="maxlength" |
12 | 12 | :readonly="readonly" |
13 | + :name="name" | |
13 | 14 | v-model="value" |
14 | 15 | @keyup.enter="handleEnter" |
15 | 16 | @focus="handleFocus" |
... | ... | @@ -26,6 +27,7 @@ |
26 | 27 | :rows="rows" |
27 | 28 | :maxlength="maxlength" |
28 | 29 | :readonly="readonly" |
30 | + :name="name" | |
29 | 31 | v-model="value" |
30 | 32 | @keyup.enter="handleEnter" |
31 | 33 | @focus="handleFocus" |
... | ... | @@ -80,6 +82,9 @@ |
80 | 82 | readonly: { |
81 | 83 | type: Boolean, |
82 | 84 | default: false |
85 | + }, | |
86 | + name: { | |
87 | + type: String | |
83 | 88 | } |
84 | 89 | }, |
85 | 90 | data () { | ... | ... |
test/routers/input.vue
1 | 1 | <template> |
2 | - <i-input icon="ios-clock-outline" @on-focus="focus" @on-blur="blur" readonly style="width:200px;" :value.sync="v" @on-enter="enter" @on-click="iconclick" size="large" placeholder="请输入"></i-input> | |
2 | + <i-input name="a" icon="ios-clock-outline" @on-focus="focus" @on-blur="blur" readonly style="width:200px;" :value.sync="v" @on-enter="enter" @on-click="iconclick" size="large" placeholder="请输入"></i-input> | |
3 | 3 | <i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" placeholder="请输入"></i-input> |
4 | - <i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" size="small" placeholder="请输入"></i-input> | |
4 | + <i-input name="b" icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" size="small" placeholder="请输入"></i-input> | |
5 | 5 | <br> |
6 | 6 | <br> |
7 | 7 | <i-input style="width:200px;" :value.sync="v" @on-enter="enter" size="large" placeholder="请输入"></i-input> | ... | ... |