diff --git a/uview-ui/components/u-button/u-button.vue b/uview-ui/components/u-button/u-button.vue index 82c3a6f0..3b3d6f69 100644 --- a/uview-ui/components/u-button/u-button.vue +++ b/uview-ui/components/u-button/u-button.vue @@ -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() {