0👍
Try to apply the class to the button
element, not a span
inside the button element.
<Button v-if="canManageDeliveryPlan" :class='myClass' variant="tertiary" small @click="handleCreatePlanClick(row)">
// computed ( or use a computed ref in vue3)
computed: {
myClass() {
const disabled =
row.shipmentStatus === 'CANCELLED' && row.deliveryOrderCount == 0
return {disabled}
}
}
Source:stackexchange.com