Commit 076148112f937f1c15c2930539cfe47891361e0a

Authored by 梁灏
1 parent 11867c87

update Input textarea style

examples/routers/input.vue
1 1 <template>
2   - <div style="width: 100px;">
3   - <Input autocomplete="on" v-model="value1" size="large" placeholder="large size"></Input>
4   - <br>
5   - <Input v-model="value2" placeholder="default size"></Input>
6   - <br>
7   - <Input v-model="value3" size="small" placeholder="small size"></Input>
8   - <br>
9   - <Input v-model="value1" size="large" placeholder="large size" icon="ios-clock-outline"></Input>
10   - <br>
11   - <Input v-model="value2" placeholder="default size" icon="ios-clock-outline"></Input>
12   - <br>
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>
  2 + <div style="width: 300px">
  3 + <Input v-model="value7" type="textarea" :autosize="true" placeholder="Enter something..."></Input>
  4 + <Input v-model="value8" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="Enter something..."></Input>
16 5 </div>
17 6 </template>
18 7 <script>
19 8 export default {
20 9 data () {
21 10 return {
22   - value1: '',
23   - value2: '',
24   - value3: '',
25   - obj: {
26   -
27   - }
  11 + value7: '',
  12 + value8: ''
28 13 }
29 14 }
30 15 }
... ...
src/styles/common/normalize.less
... ... @@ -358,6 +358,7 @@ progress {
358 358  
359 359 textarea {
360 360 overflow: auto;
  361 + resize: vertical;
361 362 }
362 363  
363 364 /**
... ...
src/styles/mixins/input.less
... ... @@ -72,6 +72,7 @@
72 72 textarea& {
73 73 max-width: 100%;
74 74 height: auto;
  75 + min-height: @input-height-base;
75 76 vertical-align: bottom;
76 77 font-size: @font-size-base;
77 78 }
... ...