Commit 56358029603791fb2fc4eafad314585cc4ed2b56
Committed by
GitHub
Merge pull request #1400 from lcx960324/2.0
fix #1084
Showing
4 changed files
with
13 additions
and
4 deletions
Show diff stats
examples/routers/input-number.vue
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | {{ v1 }} | 4 | {{ v1 }} |
5 | <div @click="c">change v1</div> | 5 | <div @click="c">change v1</div> |
6 | <Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number> | 6 | <Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number> |
7 | + <Input-number :max="10" :min="1" v-model="obj.v"></Input-number> | ||
7 | </div> | 8 | </div> |
8 | </template> | 9 | </template> |
9 | <script> | 10 | <script> |
@@ -13,7 +14,10 @@ | @@ -13,7 +14,10 @@ | ||
13 | return { | 14 | return { |
14 | v1: 1, | 15 | v1: 1, |
15 | v2: 1, | 16 | v2: 1, |
16 | - autofocus: true | 17 | + autofocus: true, |
18 | + obj: { | ||
19 | + | ||
20 | + } | ||
17 | }; | 21 | }; |
18 | }, | 22 | }, |
19 | computed: {}, | 23 | computed: {}, |
examples/routers/input.vue
@@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
11 | <Input v-model="value2" placeholder="default size" icon="ios-clock-outline"></Input> | 11 | <Input v-model="value2" placeholder="default size" icon="ios-clock-outline"></Input> |
12 | <br> | 12 | <br> |
13 | <Input v-model="value3" size="small" placeholder="small size" icon="ios-clock-outline"></Input> | 13 | <Input v-model="value3" size="small" placeholder="small size" icon="ios-clock-outline"></Input> |
14 | + <br> | ||
15 | + <Input v-model="obj.test" type="textarea" autosize></Input> | ||
14 | </div> | 16 | </div> |
15 | </template> | 17 | </template> |
16 | <script> | 18 | <script> |
@@ -19,7 +21,10 @@ | @@ -19,7 +21,10 @@ | ||
19 | return { | 21 | return { |
20 | value1: '', | 22 | value1: '', |
21 | value2: '', | 23 | value2: '', |
22 | - value3: '' | 24 | + value3: '', |
25 | + obj: { | ||
26 | + | ||
27 | + } | ||
23 | } | 28 | } |
24 | } | 29 | } |
25 | } | 30 | } |
src/components/input-number/input-number.vue
src/components/input/input.vue
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | :maxlength="maxlength" | 39 | :maxlength="maxlength" |
40 | :readonly="readonly" | 40 | :readonly="readonly" |
41 | :name="name" | 41 | :name="name" |
42 | - :value="value" | 42 | + :value="currentValue" |
43 | :autofocus="autofocus" | 43 | :autofocus="autofocus" |
44 | @keyup.enter="handleEnter" | 44 | @keyup.enter="handleEnter" |
45 | @keyup="handleKeyup" | 45 | @keyup="handleKeyup" |