From 0991a15b5efe40874ee11a5995d58729450d30b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 22 Jun 2023 17:16:55 +0300 Subject: [PATCH] Refactor #3965 - For Button --- components/lib/button/BaseButton.vue | 2 +- components/lib/button/Button.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/button/BaseButton.vue b/components/lib/button/BaseButton.vue index 755de0fd5..8bcdc9742 100644 --- a/components/lib/button/BaseButton.vue +++ b/components/lib/button/BaseButton.vue @@ -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, diff --git a/components/lib/button/Button.vue b/components/lib/button/Button.vue index 1faf32530..30f7ac19d 100755 --- a/components/lib/button/Button.vue +++ b/components/lib/button/Button.vue @@ -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'];