Refactor #3965 - For Button

pull/4077/head
Tuğçe Küçükoğlu 2023-06-22 17:16:55 +03:00
parent e677627b0c
commit 0991a15b5e
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ const classes = {
{
'p-button-icon-only': instance.hasIcon && !props.label,
'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,
'p-disabled': instance.$attrs.disabled || props.loading,
'p-disabled': instance.$attrs.disabled || instance.$attrs.disabled === '' || props.loading,
'p-button-loading': props.loading,
'p-button-loading-label-only': props.loading && !instance.hasIcon && props.label,
'p-button-link': props.link,

View File

@ -24,7 +24,7 @@ export default {
extends: BaseButton,
computed: {
disabled() {
return this.$attrs.disabled || this.loading;
return this.$attrs.disabled || this.$attrs.disabled === '' || this.loading;
},
defaultAriaLabel() {
return this.label ? this.label + (this.badge ? ' ' + this.badge : '') : this.$attrs['aria-label'];