adminforth 1.0.48 → 1.0.49
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.
- package/dist/index.js +1 -7
- package/dist/spa/spa/src/views/CreateView.vue +1 -1
- package/dist/spa/spa/src/views/EditView.vue +1 -1
- package/dist/spa/spa/src/views/ListView.vue +1 -1
- package/index.ts +1 -9
- package/package.json +1 -1
- package/spa/src/views/CreateView.vue +1 -1
- package/spa/src/views/EditView.vue +1 -1
- package/spa/src/views/ListView.vue +1 -1
package/dist/index.js
CHANGED
|
@@ -544,13 +544,6 @@ class AdminForth {
|
|
|
544
544
|
data.data.forEach((item) => {
|
|
545
545
|
item[col.name] = targetDataMap[item[col.name]];
|
|
546
546
|
});
|
|
547
|
-
data.data.forEach((item) => {
|
|
548
|
-
Object.keys(item).forEach((key) => {
|
|
549
|
-
if (!targetResource.columns.find((col) => col.name === key) || targetResource.columns.find((col) => col.name === key && col.backendOnly)) {
|
|
550
|
-
delete item[key];
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
});
|
|
554
547
|
})));
|
|
555
548
|
data.data.forEach((item) => {
|
|
556
549
|
item._label = resource.itemLabel(item);
|
|
@@ -572,6 +565,7 @@ class AdminForth {
|
|
|
572
565
|
}
|
|
573
566
|
});
|
|
574
567
|
});
|
|
568
|
+
console.log('data', data);
|
|
575
569
|
return Object.assign(Object.assign({}, data), { options: resource === null || resource === void 0 ? void 0 : resource.options });
|
|
576
570
|
}),
|
|
577
571
|
});
|
|
@@ -75,7 +75,7 @@ onMounted(async () => {
|
|
|
75
75
|
resourceId: route.params.resourceId
|
|
76
76
|
});
|
|
77
77
|
createComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
78
|
-
if (column.component?.
|
|
78
|
+
if (column.component?.create) {
|
|
79
79
|
acc[column.name] = getCustomComponent(column.component.create.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
80
80
|
}
|
|
81
81
|
return acc;
|
|
@@ -90,7 +90,7 @@ onMounted(async () => {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
editComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
93
|
-
if (column.component?.
|
|
93
|
+
if (column.component?.edit) {
|
|
94
94
|
acc[column.name] = getCustomComponent(column.component.edit.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
95
95
|
}
|
|
96
96
|
return acc;
|
|
@@ -432,7 +432,7 @@ async function getList() {
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
listComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
435
|
-
if (column.component?.
|
|
435
|
+
if (column.component?.list) {
|
|
436
436
|
acc[column.name] = getCustomComponent(column.component.list.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
437
437
|
}
|
|
438
438
|
return acc;
|
package/index.ts
CHANGED
|
@@ -617,15 +617,6 @@ class AdminForth {
|
|
|
617
617
|
data.data.forEach((item) => {
|
|
618
618
|
item[col.name] = targetDataMap[item[col.name]];
|
|
619
619
|
});
|
|
620
|
-
|
|
621
|
-
data.data.forEach((item) => {
|
|
622
|
-
Object.keys(item).forEach((key) => {
|
|
623
|
-
if (!targetResource.columns.find((col) => col.name === key) || targetResource.columns.find((col) => col.name === key && col.backendOnly)) {
|
|
624
|
-
delete item[key];
|
|
625
|
-
}
|
|
626
|
-
})
|
|
627
|
-
});
|
|
628
|
-
|
|
629
620
|
})
|
|
630
621
|
);
|
|
631
622
|
|
|
@@ -653,6 +644,7 @@ class AdminForth {
|
|
|
653
644
|
}
|
|
654
645
|
})
|
|
655
646
|
});
|
|
647
|
+
console.log('data', data);
|
|
656
648
|
|
|
657
649
|
return {...data, options: resource?.options };
|
|
658
650
|
},
|
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@ onMounted(async () => {
|
|
|
75
75
|
resourceId: route.params.resourceId
|
|
76
76
|
});
|
|
77
77
|
createComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
78
|
-
if (column.component?.
|
|
78
|
+
if (column.component?.create) {
|
|
79
79
|
acc[column.name] = getCustomComponent(column.component.create.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
80
80
|
}
|
|
81
81
|
return acc;
|
|
@@ -90,7 +90,7 @@ onMounted(async () => {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
editComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
93
|
-
if (column.component?.
|
|
93
|
+
if (column.component?.edit) {
|
|
94
94
|
acc[column.name] = getCustomComponent(column.component.edit.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
95
95
|
}
|
|
96
96
|
return acc;
|
|
@@ -432,7 +432,7 @@ async function getList() {
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
listComponentsPerColumn = coreStore.resourceColumns.reduce((acc, column) => {
|
|
435
|
-
if (column.component?.
|
|
435
|
+
if (column.component?.list) {
|
|
436
436
|
acc[column.name] = getCustomComponent(column.component.list.replace('@@', '').replace('./custom/', '')).split('.')[0];
|
|
437
437
|
}
|
|
438
438
|
return acc;
|