adminforth 2.38.0-next.2 → 2.38.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="w-full mt-[36px]">
|
|
3
3
|
<div class="w-full border dark:border-darkFormBorder border-gray-200 rounded-lg overflow-hidden shadow-resourseFormShadow dark:shadow-darkResourseFormShadow bg-white dark:bg-darkForm">
|
|
4
4
|
|
|
5
|
-
<div class="flex px-6 items-center border-b border-gray-200 dark:border-darkFormBorder bg-lightFormHeading dark:bg-darkFormHeading
|
|
5
|
+
<div class="flex px-6 items-center border-b border-gray-200 dark:border-darkFormBorder bg-lightFormHeading dark:bg-darkFormHeading h-[40px]">
|
|
6
6
|
<div class="w-[208px] flex-shrink-0 pr-6 text-xs text-lightListTableHeadingText uppercase dark:text-darkListTableHeadingText font-bold">
|
|
7
7
|
{{ $t('Field') }}
|
|
8
8
|
</div>
|
|
@@ -11,64 +11,24 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<div class="flex-1 px-6">
|
|
24
|
-
<Skeleton type="input" :class="getSkeletonInputClass(column)" />
|
|
14
|
+
<div
|
|
15
|
+
v-for="i in 10"
|
|
16
|
+
:key="i"
|
|
17
|
+
class="flex items-center bg-lightForm dark:bg-darkForm border-b border-gray-100 dark:border-darkFormBorder h-[75px]"
|
|
18
|
+
>
|
|
19
|
+
<div class="w-[208px] flex-shrink-0 px-6 flex items-center">
|
|
20
|
+
<Skeleton class="w-24 h-[10px]" />
|
|
21
|
+
</div>
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
23
|
+
<div class="flex-1 px-6">
|
|
24
|
+
<Skeleton class="h-[10px] w-full" />
|
|
30
25
|
</div>
|
|
26
|
+
</div>
|
|
31
27
|
|
|
32
|
-
</template>
|
|
33
28
|
</div>
|
|
34
29
|
</div>
|
|
35
30
|
</template>
|
|
36
31
|
|
|
37
32
|
<script setup lang="ts">
|
|
38
|
-
import { computed } from 'vue';
|
|
39
33
|
import { Skeleton } from '@/afcl';
|
|
40
|
-
|
|
41
|
-
interface Props {
|
|
42
|
-
resource?: any;
|
|
43
|
-
page?: string;}
|
|
44
|
-
|
|
45
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
46
|
-
page: 'edit'
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const visibleColumns = computed(() => {
|
|
50
|
-
if (!props.resource?.columns) return [];
|
|
51
|
-
|
|
52
|
-
return props.resource.columns.filter((col: any) => {
|
|
53
|
-
if (col.virtual) return false;
|
|
54
|
-
if (col.primaryKey) return false;
|
|
55
|
-
if (col.backendOnly) return false;
|
|
56
|
-
if (col.showIn?.[props.page] === false) return false;
|
|
57
|
-
return true;
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const hasEditingNote = (column: any) => !!column.editingNote;
|
|
63
|
-
|
|
64
|
-
const getFieldHeight = (column: any) =>
|
|
65
|
-
hasEditingNote(column) ? '95px' : '75px';
|
|
66
|
-
|
|
67
|
-
const getSkeletonInputClass = (column: any) => {
|
|
68
|
-
if (['integer', 'decimal', 'float'].includes(column.type)) {
|
|
69
|
-
return 'h-[42px] w-[160px]';
|
|
70
|
-
}
|
|
71
|
-
return 'h-[42px] w-full';
|
|
72
|
-
};
|
|
73
|
-
|
|
74
34
|
</script>
|