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