Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions uview-ui/components/u-button/u-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,12 @@ export default {
// 当没有传bgColor变量时,按钮按下去的颜色类名
getHoverClass() {
// 如果开启水波纹效果,则不启用hover-class效果
if (this.loading || this.disabled || this.ripple || this.hoverClass) return '';
let hoverClass = '';
hoverClass = this.plain ? 'u-' + this.type + '-plain-hover' : 'u-' + this.type + '-hover';
return hoverClass;
if (this.loading || this.disabled || this.ripple) {
return '';
} else if (this.hoverClass) {
return this.hoverClass;
}
return this.plain ? 'u-' + this.type + '-plain-hover' : 'u-' + this.type + '-hover';
},
// 在'primary', 'success', 'error', 'warning'类型下,不显示边框,否则会造成四角有毛刺现象
showHairLineBorder() {
Expand Down