Commit f4e462c05176512ab40d802026695ec474e18c99
1 parent
319f5f86
#554
Showing
3 changed files
with
15 additions
and
2 deletions
Show diff stats
examples/routers/input.vue
| 1 | <template> | 1 | <template> |
| 2 | <div style="width: 300px;"> | 2 | <div style="width: 300px;"> |
| 3 | + <i-input v-model="value11"> | ||
| 4 | + </i-input> | ||
| 5 | + <i-input v-model="value11" icon="ios-clock-outline"> | ||
| 6 | + <span slot="prepend">.com</span> | ||
| 7 | + </i-input> | ||
| 3 | <i-input v-model="value11" icon="ios-clock-outline"> | 8 | <i-input v-model="value11" icon="ios-clock-outline"> |
| 4 | - <span slot="prepend">http://</span> | 9 | + <span slot="append">.com</span> |
| 5 | </i-input> | 10 | </i-input> |
| 6 | </div> | 11 | </div> |
| 7 | </template> | 12 | </template> |
src/components/input/input.vue
| @@ -118,7 +118,8 @@ | @@ -118,7 +118,8 @@ | ||
| 118 | [`${prefixCls}-wrapper-${this.size}`]: !!this.size, | 118 | [`${prefixCls}-wrapper-${this.size}`]: !!this.size, |
| 119 | [`${prefixCls}-type`]: this.type, | 119 | [`${prefixCls}-type`]: this.type, |
| 120 | [`${prefixCls}-group`]: this.prepend || this.append, | 120 | [`${prefixCls}-group`]: this.prepend || this.append, |
| 121 | - [`${prefixCls}-group-${this.size}`]: (this.prepend || this.append) && !!this.size | 121 | + [`${prefixCls}-group-${this.size}`]: (this.prepend || this.append) && !!this.size, |
| 122 | + [`${prefixCls}-hide-icon`]: this.append // #554 | ||
| 122 | } | 123 | } |
| 123 | ]; | 124 | ]; |
| 124 | }, | 125 | }, |
src/styles/components/input.less
| @@ -19,6 +19,9 @@ | @@ -19,6 +19,9 @@ | ||
| 19 | right: 0; | 19 | right: 0; |
| 20 | z-index: 3; | 20 | z-index: 3; |
| 21 | } | 21 | } |
| 22 | + &-hide-icon &-icon{ | ||
| 23 | + display: none; | ||
| 24 | + } | ||
| 22 | &-icon-validate{ | 25 | &-icon-validate{ |
| 23 | display: none; | 26 | display: none; |
| 24 | } | 27 | } |
| @@ -26,6 +29,10 @@ | @@ -26,6 +29,10 @@ | ||
| 26 | &-icon-normal + &{ | 29 | &-icon-normal + &{ |
| 27 | padding-right: 32px; | 30 | padding-right: 32px; |
| 28 | } | 31 | } |
| 32 | + // #554 | ||
| 33 | + &-hide-icon &-icon-normal + &{ | ||
| 34 | + padding-right: @input-padding-horizontal; | ||
| 35 | + } | ||
| 29 | 36 | ||
| 30 | &-wrapper-large &-icon{ | 37 | &-wrapper-large &-icon{ |
| 31 | font-size: 18px; | 38 | font-size: 18px; |