Skip to content

Commit b1bee88

Browse files
committed
feat: enhance loading skeleton with improved styles and dynamic row count
1 parent 0bf52de commit b1bee88

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

adminforth/spa/src/views/ShowView.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const customActions = computed(() => {
203203
});
204204
205205
const skeletonRowsCount = computed(() => {
206-
const allCols = coreStore.resource?.columns;
206+
const allCols = coreStore.resource?.columns || [];
207207
208208
const isEnabledInConfig = (col: any) => {
209209
return col.showIn?.list !== false;
@@ -253,17 +253,17 @@ const groups = computed(() => {
253253
});
254254
255255
const allColumns = computed(() => {
256-
return coreStore.resource?.columns?.filter(col => col.showIn?.show) ?? [];
256+
return coreStore.resource?.columns?.filter(col => col.showIn?.show);
257257
});
258258
259259
const otherColumns = computed(() => {
260260
const groupedColumnNames = new Set(
261-
groups.value.flatMap(group => group.columns?.map((col: AdminForthResourceColumnCommon) => col.name) || [])
261+
groups.value.flatMap(group => group.columns?.map((col: AdminForthResourceColumnCommon) => col.name))
262262
);
263263
264-
return coreStore.resource?.columns?.filter(
264+
return coreStore.resource?.columns.filter(
265265
col => !groupedColumnNames.has(col.name) && col.showIn?.show
266-
) ?? [];
266+
);
267267
});
268268
269269
async function deleteRecord() {

0 commit comments

Comments
 (0)