Input add border prop
This commit is contained in:
parent
3fde9d0006
commit
b96359ca18
2 changed files with 26 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
];
|
||||
},
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue