From c9f51ca41629ab7ae8ba47716924674bf0b3794c Mon Sep 17 00:00:00 2001 From: xilesun <2013xile@gmail.com> Date: Mon, 19 Jun 2023 21:53:33 +0800 Subject: [PATCH] fix(oidc): field map bug --- packages/plugins/oidc/src/client/Options.tsx | 70 +++++++++----------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/packages/plugins/oidc/src/client/Options.tsx b/packages/plugins/oidc/src/client/Options.tsx index 6b2feb76a..ec4c45401 100644 --- a/packages/plugins/oidc/src/client/Options.tsx +++ b/packages/plugins/oidc/src/client/Options.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { SchemaComponent } from '@nocobase/client'; -import { Card, message } from 'antd'; +import { Card, message, Space } from 'antd'; import { CopyOutlined } from '@ant-design/icons'; import { observer } from '@formily/react'; import { FormItem, Input } from '@nocobase/client'; @@ -83,43 +83,37 @@ const schema = { type: 'object', 'x-decorator': 'ArrayItems.Item', properties: { - source: { - type: 'string', - title: '{{t("source")}}', - 'x-decorator': 'Editable', - 'x-component': 'Input', - 'x-component-props': { - placeholder: '{{t("source")}}', - }, - 'x-decorator-props': { - style: { - width: '45%', - }, - }, - }, - target: { - type: 'string', - title: '{{t("target")}}', - 'x-decorator': 'Editable', - 'x-component': 'Select', - 'x-component-props': { - placeholder: '{{t("target")}}', - }, - 'x-decorator-props': { - style: { - width: '45%', - }, - }, - enum: [ - { label: 'Nickname', value: 'nickname' }, - { label: 'Email', value: 'email' }, - { label: 'Phone', value: 'phone' }, - ], - }, - remove: { + space: { type: 'void', - 'x-decorator': 'FormItem', - 'x-component': 'ArrayItems.Remove', + 'x-component': 'Space', + properties: { + source: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Input', + 'x-component-props': { + placeholder: '{{t("source")}}', + }, + }, + target: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Select', + 'x-component-props': { + placeholder: '{{t("target")}}', + }, + enum: [ + { label: 'Nickname', value: 'nickname' }, + { label: 'Email', value: 'email' }, + { label: 'Phone', value: 'phone' }, + ], + }, + remove: { + type: 'void', + 'x-decorator': 'FormItem', + 'x-component': 'ArrayItems.Remove', + }, + }, }, }, }, @@ -162,5 +156,5 @@ const Usage = observer(() => { export const Options = () => { const { t } = useOidcTranslation(); - return ; + return ; };