feat: add table urgent display

This commit is contained in:
Thanaphon Frappet 2024-11-08 10:42:47 +07:00
parent 983f48f7e2
commit 4db0987dd2

View file

@ -68,7 +68,7 @@ defineEmits<{
</template>
<template v-slot:body="props">
<q-tr>
<q-tr :class="{ urgent: props.row.urgent }">
<q-td v-if="visibleColumns.includes('order')">
{{ props.rowIndex + 1 }}
</q-td>
@ -147,4 +147,35 @@ defineEmits<{
</q-table>
</template>
<style scoped></style>
<style scoped>
.q-table tr.urgent {
background: hsla(var(--red-6-hsl) / 0.03);
}
.q-table tr.urgent td:first-child {
&::after {
content: ' ';
display: block;
position: absolute;
left: 0;
top: 5%;
bottom: 5%;
background: var(--red-8);
width: 4px;
border-radius: 99rem;
animation: blink 1s infinite;
}
}
@keyframes blink {
0% {
background: var(--red-8);
}
50% {
background: var(--red-3);
}
100% {
background: var(--red-8);
}
}
</style>