From 97d1db5e92f986f10cc8b45661809ef52a70ac72 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Mon, 29 Jan 2024 12:06:49 +0800 Subject: [PATCH] refactor: code improve --- .../EditCollectionAction.tsx | 2 +- .../CollectionsManager/schema/collections.ts | 44 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx index 69b95c7f14..866a9cd1fd 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx @@ -55,7 +55,7 @@ const getSchema = (schema: IField, record: any, compile, getContainer): ISchema }, title: '{{ t("Edit collection") }}', properties: { - ...omit(properties, 'category'), + ...omit(properties, 'category', 'inherits', 'moreOptions'), footer: { type: 'void', 'x-component': 'Action.Drawer.Footer', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts index f52466e341..2c9601a173 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts @@ -37,16 +37,16 @@ export const collection: CollectionOptions = { '{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}', }, }, - { - type: 'string', - name: 'template', - interface: 'input', - uiSchema: { - title: '{{ t("Collection Template") }}', - type: 'string', - 'x-component': 'Input', - }, - }, + // { + // type: 'string', + // name: 'template', + // interface: 'input', + // uiSchema: { + // title: '{{ t("Collection Template") }}', + // type: 'string', + // 'x-component': 'Input', + // }, + // }, { type: 'hasMany', name: 'fields', @@ -220,18 +220,18 @@ export const collectionTableSchema: ISchema = { }, }, }, - column3: { - type: 'void', - 'x-decorator': 'Table.Column.Decorator', - 'x-component': 'Table.Column', - title: '{{t("Collection template")}}', - properties: { - template: { - 'x-component': CollectionTemplate, - 'x-read-pretty': true, - }, - }, - }, + // column3: { + // type: 'void', + // 'x-decorator': 'Table.Column.Decorator', + // 'x-component': 'Table.Column', + // title: '{{t("Collection template")}}', + // properties: { + // template: { + // 'x-component': CollectionTemplate, + // 'x-read-pretty': true, + // }, + // }, + // }, column5: { type: 'void', 'x-decorator': 'Table.Column.Decorator',