Skip to content

Commit

Permalink
add class name for each column
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyang committed Sep 1, 2022
1 parent b6ce15e commit db6c748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/ui/Table/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

<th v-for="(column, index) in displayable"
v-show="! hasSelections"
:class="{'sortable': isSortable(column), 'active': (sort.key === column), 'w-96': (column === 'url')}"
:class="{'sortable': isSortable(column), 'active': (sort.key === column), 'w-96': (column === 'url'), ['th-' + column]: true}"
:key="column[primaryKey] || index">
<a href="#" v-if="isSortable(column)" class="table__heading table__heading--link" @click.prevent="isSortable(column) && sortRecordsBy(column)" :aria-label="'Sort by ' + column_names[column] || column">
<span>{{ column_names[column] || column }}</span>
Expand Down Expand Up @@ -175,7 +175,7 @@
</slot>
</td>

<td class="table__actions w-20" v-if="hasActions">
<td class="'table__actions w-20 td-' + column" v-if="hasActions">
<slot name="actions" :record="record"></slot>
</td>
</tr>
Expand Down

0 comments on commit db6c748

Please sign in to comment.