refactor: натравил форматтер на весь фронт
This commit is contained in:
@@ -10,20 +10,14 @@ defineProps<{
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
v-for="col in columns"
|
||||
:key="col.key"
|
||||
:class="`align-${col.align ?? 'left'}`"
|
||||
>{{ col.label }}</th>
|
||||
<th v-for="col in columns" :key="col.key" :class="`align-${col.align ?? 'left'}`">
|
||||
{{ col.label }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(row, i) in rows" :key="i">
|
||||
<td
|
||||
v-for="col in columns"
|
||||
:key="col.key"
|
||||
:class="`align-${col.align ?? 'left'}`"
|
||||
>
|
||||
<td v-for="col in columns" :key="col.key" :class="`align-${col.align ?? 'left'}`">
|
||||
<slot :name="col.key" :row="row" :value="row[col.key]">
|
||||
{{ row[col.key] }}
|
||||
</slot>
|
||||
@@ -57,11 +51,19 @@ defineProps<{
|
||||
border-bottom: 1px solid var(--color-border-glass);
|
||||
color: var(--color-text);
|
||||
}
|
||||
.data-table tbody tr:last-child td { border-bottom: none; }
|
||||
.data-table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
.data-table tbody tr:hover td {
|
||||
background: var(--color-primary-a05);
|
||||
}
|
||||
.align-left { text-align: left; }
|
||||
.align-center { text-align: center; }
|
||||
.align-right { text-align: right; }
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user