Commit e2affe49cf7f50c6864f3edbc673e81de1d50f00
1 parent
f4e462c0
fixed #397
Showing
3 changed files
with
13 additions
and
5 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"> | 3 | <i-input v-model="value11" icon="ios-clock-outline"> |
| 6 | <span slot="prepend">.com</span> | 4 | <span slot="prepend">.com</span> |
| 7 | </i-input> | 5 | </i-input> |
src/components/input/input.vue
| @@ -119,6 +119,8 @@ | @@ -119,6 +119,8 @@ | ||
| 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}-group-with-prepend`]: this.prepend, | ||
| 123 | + [`${prefixCls}-group-with-append`]: this.append, | ||
| 122 | [`${prefixCls}-hide-icon`]: this.append // #554 | 124 | [`${prefixCls}-hide-icon`]: this.append // #554 |
| 123 | } | 125 | } |
| 124 | ]; | 126 | ]; |
src/styles/mixins/input.less
| @@ -124,9 +124,17 @@ | @@ -124,9 +124,17 @@ | ||
| 124 | > .@{inputClass} { | 124 | > .@{inputClass} { |
| 125 | display: table-cell; | 125 | display: table-cell; |
| 126 | 126 | ||
| 127 | - &:not(:first-child):not(:last-child) { | ||
| 128 | - border-radius: 0; | ||
| 129 | - } | 127 | + //&:not(:first-child):not(:last-child) { |
| 128 | + // border-radius: 0; | ||
| 129 | + //} | ||
| 130 | + } | ||
| 131 | + &-with-prepend .@{inputClass} { | ||
| 132 | + border-top-left-radius: 0; | ||
| 133 | + border-bottom-left-radius: 0; | ||
| 134 | + } | ||
| 135 | + &-with-append .@{inputClass} { | ||
| 136 | + border-top-right-radius: 0; | ||
| 137 | + border-bottom-right-radius: 0; | ||
| 130 | } | 138 | } |
| 131 | 139 | ||
| 132 | &-prepend .@{css-prefix}btn, | 140 | &-prepend .@{css-prefix}btn, |