fix: disabled state button can still be click

This commit is contained in:
Methapon2001 2024-12-25 13:52:34 +07:00
parent 80ab12d77d
commit d1b81fe30e

View file

@ -15,6 +15,10 @@ withDefaults(
label: '',
},
);
defineEmits<{
(e: 'click'): void;
}>();
</script>
<template>
<button
@ -26,6 +30,7 @@ withDefaults(
['status-color-waiting']: statusWaiting,
['step-status-active']: statusActive,
}"
@click="statusWaiting ? undefined : $emit('click')"
>
<div class="q-px-sm">
<q-icon
@ -59,6 +64,7 @@ withDefaults(
&.status-color-waiting {
--_color: var(--gray-4-hsl);
color: var(--foreground);
cursor: not-allowed !important;
}
}