Skip to content

Commit b6225ec

Browse files
committedAug 16, 2023
feat(table): add hover state for rows
1 parent d5bd9eb commit b6225ec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎src/components/table/UTable.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function onSort(column: { key: string; direction?: 'asc' | 'desc' }) {
9999
<tbody :class="config.tbody">
100100
<tr
101101
v-for="(row, index) in rows" :key="index"
102-
:class="[config.tr.base, isSelected(row) && config.tr.selected]"
102+
:class="[config.tr.base, config.tr.hover, isSelected(row) && config.tr.selected]"
103103
@click="emit('row-clicked', row)"
104104
>
105105
<td class="w-0 pl-4">

‎src/components/table/table.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const table = {
77
tr: {
88
base: '',
99
selected: 'bg-light-200 dark:bg-dark-700',
10+
hover: 'hover:bg-light-200 hover:dark:bg-dark-700',
1011
},
1112
th: {
1213
base: 'text-left font-normal',

0 commit comments

Comments
 (0)