Skip to content

Commit 9f74eeb

Browse files
committed
fix: move column name at the start of row for the show/edit/create views[2]
https://web.tracklify.com/project/2b7ZVgE5/AdminForth/1228/BBMiKsfJ/we-need-to-adjust-row-title-at
1 parent 133cdb4 commit 9f74eeb

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

adminforth/spa/src/components/GroupsTable.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,23 @@
2222
class="bg-lightForm dark:bg-darkForm dark:border-darkFormBorder block md:table-row"
2323
:class="{ 'border-b': i !== group.columns.length - 1}"
2424
>
25-
<td class="px-6 py-4 flex items-center block pb-0 md:pb-4"
25+
<td class="px-6 py-4 flex items-center block pb-0 md:pb-4 relative md:table-cell"
2626
:class="{'rounded-bl-lg border-b-none': i === group.columns.length - 1}"> <!--align-top-->
27-
<span class="flex items-center gap-1">
28-
{{ column.label }}
29-
<Tooltip v-if="column.required[mode]">
27+
<div class="absolute inset-0 flex items-center overflow-hidden px-6 py-4 max-h-32">
28+
<span class="flex items-center gap-1">
29+
{{ column.label }}
30+
<Tooltip v-if="column.required[mode]">
3031

31-
<IconExclamationCircleSolid v-if="column.required[mode]" class="w-4 h-4"
32-
:class="(columnError(column) && validating) ? 'text-lightInputErrorColor dark:text-darkInputErrorColor' : 'text-lightRequiredIconColor dark:text-darkRequiredIconColor'"
33-
/>
32+
<IconExclamationCircleSolid v-if="column.required[mode]" class="w-4 h-4"
33+
:class="(columnError(column) && validating) ? 'text-lightInputErrorColor dark:text-darkInputErrorColor' : 'text-lightRequiredIconColor dark:text-darkRequiredIconColor'"
34+
/>
3435

35-
<template #tooltip>
36-
{{ $t('Required field') }}
37-
</template>
38-
</Tooltip>
39-
</span>
36+
<template #tooltip>
37+
{{ $t('Required field') }}
38+
</template>
39+
</Tooltip>
40+
</span>
41+
</div>
4042
</td>
4143
<td
4244
class="px-6 py-4 whitespace-pre-wrap relative block md:table-cell"

adminforth/spa/src/components/ShowTable.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
:record="coreStore.record"
3333
/>
3434
<template v-else-if="checkShowIf(column, record, resource?.columns || [])">
35-
<td class="px-6 py-4 relative block flex justify-start font-bold md:font-normal pb-0 md:pb-4">
36-
{{ column.label }}
35+
<td class="px-6 py-4 relative block flex justify-start font-bold md:font-normal pb-0 md:pb-4 relative md:table-cell">
36+
<div class="absolute inset-0 flex items-center overflow-hidden px-6 py-4 max-h-32">
37+
{{ column.label }}
38+
</div>
3739
</td>
3840
<td class="px-6 py-4 whitespace-pre-wrap" :data-af-column="column.name">
3941
<component

0 commit comments

Comments
 (0)