diff --git a/src/components/input/input.vue b/src/components/input/input.vue index 4928f9dd..da7135bf 100644 --- a/src/components/input/input.vue +++ b/src/components/input/input.vue @@ -190,6 +190,11 @@ password: { type: Boolean, default: false + }, + // 4.5.0 + border: { + type: Boolean, + default: true } }, data () { @@ -250,6 +255,7 @@ { [`${prefixCls}-${this.size}`]: !!this.size, [`${prefixCls}-disabled`]: this.itemDisabled, + [`${prefixCls}-no-border`]: !this.border, [`${prefixCls}-with-prefix`]: this.showPrefix, [`${prefixCls}-with-suffix`]: this.showSuffix || (this.search && this.enterButton === false) } @@ -259,7 +265,8 @@ return [ `${prefixCls}`, { - [`${prefixCls}-disabled`]: this.itemDisabled + [`${prefixCls}-disabled`]: this.itemDisabled, + [`${prefixCls}-no-border`]: !this.border } ]; }, diff --git a/src/styles/mixins/input.less b/src/styles/mixins/input.less index b7520b47..fb624e27 100644 --- a/src/styles/mixins/input.less +++ b/src/styles/mixins/input.less @@ -85,6 +85,24 @@ &-small { .input-small(); } + + &-no-border{ + border-radius: 0; + border-color: transparent; + &:hover{ + border-color: transparent; + } + &:focus{ + border-color: transparent; + box-shadow: none; + } + &[disabled]{ + background-color: transparent; + &:hover { + border-color: transparent; + } + } + } } .input-error() {