From 2b7f138491fb01579dfb36a15e21ebb48d708c34 Mon Sep 17 00:00:00 2001 From: Junyi Date: Thu, 9 Feb 2023 22:40:26 +0800 Subject: [PATCH] fix(plugin-fm): fix path config for storages (#1445) --- .../src/client/StorageOptions.tsx | 18 ------------- .../src/client/schemas/storage.ts | 26 ++++++++++++++++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/plugins/file-manager/src/client/StorageOptions.tsx b/packages/plugins/file-manager/src/client/StorageOptions.tsx index 218c7a144..cc6fdddd6 100644 --- a/packages/plugins/file-manager/src/client/StorageOptions.tsx +++ b/packages/plugins/file-manager/src/client/StorageOptions.tsx @@ -13,12 +13,6 @@ const schema = { 'x-component': 'Input', required: true, }, - path: { - title: '{{t("Path")}}', - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Input', - }, serve: { type: 'string', 'x-decorator': 'FormItem', @@ -58,12 +52,6 @@ const schema = { 'x-component': 'Input', required: true, }, - path: { - title: '{{t("Path")}}', - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Input', - }, }, }, 'tx-cos': { @@ -128,12 +116,6 @@ const schema = { 'x-component': 'Input', required: true, }, - path: { - title: '{{t("Path")}}', - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Input', - }, }, }, }; diff --git a/packages/plugins/file-manager/src/client/schemas/storage.ts b/packages/plugins/file-manager/src/client/schemas/storage.ts index 87368b89d..0c7e33912 100644 --- a/packages/plugins/file-manager/src/client/schemas/storage.ts +++ b/packages/plugins/file-manager/src/client/schemas/storage.ts @@ -54,6 +54,16 @@ const collection = { required: true, } as ISchema, }, + { + type: 'string', + name: 'path', + interface: 'input', + uiSchema: { + title: '{{t("Path")}}', + type: 'string', + 'x-component': 'Input', + } as ISchema + }, { type: 'boolean', name: 'default', @@ -162,6 +172,10 @@ export const storageSchema: ISchema = { type: 'object', 'x-component': 'StorageOptions', }, + path: { + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + }, default: { 'x-component': 'CollectionField', 'x-decorator': 'FormItem', @@ -207,7 +221,7 @@ export const storageSchema: ISchema = { useDataSource: '{{ cm.useDataSourceFromRAC }}', }, properties: { - column1: { + title: { type: 'void', 'x-decorator': 'Table.Column.Decorator', 'x-component': 'Table.Column', @@ -219,7 +233,7 @@ export const storageSchema: ISchema = { }, }, }, - column2: { + name: { type: 'void', 'x-decorator': 'Table.Column.Decorator', 'x-component': 'Table.Column', @@ -231,7 +245,7 @@ export const storageSchema: ISchema = { }, }, }, - column3: { + default: { type: 'void', 'x-decorator': 'Table.Column.Decorator', 'x-component': 'Table.Column', @@ -243,7 +257,7 @@ export const storageSchema: ISchema = { }, }, }, - column4: { + actions: { type: 'void', title: '{{t("Actions")}}', 'x-component': 'Table.Column', @@ -294,6 +308,10 @@ export const storageSchema: ISchema = { type: 'object', 'x-component': 'StorageOptions', }, + path: { + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + }, default: { title: '', 'x-component': 'CollectionField',