Commit 8d3a02a52e87403e3be7491db2bf2ef5d865510f
1 parent
f15c216a
修改input组件 autofocus为Boolean值
Showing
4 changed files
with
10 additions
and
6 deletions
Show diff stats
examples/routers/input-number.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | - <Input-number :max="10" :min="-1" v-model="v1" autofocus></Input-number> | |
3 | + <Input-number :max="10" :min="-1" v-model="v1" :autofocus="autofocus"></Input-number> | |
4 | 4 | {{ v1 }} |
5 | 5 | <div @click="c">change v1</div> |
6 | 6 | <Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number> |
... | ... | @@ -12,7 +12,8 @@ |
12 | 12 | data () { |
13 | 13 | return { |
14 | 14 | v1: 1, |
15 | - v2: 1 | |
15 | + v2: 1, | |
16 | + autofocus: true | |
16 | 17 | }; |
17 | 18 | }, |
18 | 19 | computed: {}, | ... | ... |
examples/routers/input.vue
1 | 1 | <template> |
2 | 2 | <div style="width: 300px;"> |
3 | - <i-input v-model="value11" icon="ios-clock-outline" autofocus> | |
3 | + <i-input v-model="value11" icon="ios-clock-outline" :autofocus="autofocus"> | |
4 | 4 | <span slot="prepend">.com</span> |
5 | 5 | </i-input> |
6 | 6 | <i-input v-model="value11" icon="ios-clock-outline"> |
... | ... | @@ -17,7 +17,8 @@ |
17 | 17 | value13: '', |
18 | 18 | select1: 'http', |
19 | 19 | select2: 'com', |
20 | - select3: 'day' | |
20 | + select3: 'day', | |
21 | + autofocus: true | |
21 | 22 | } |
22 | 23 | } |
23 | 24 | } | ... | ... |
src/components/input-number/input-number.vue