From c3b89c9abfb5137a8681085b4163e2c2d7dca026 Mon Sep 17 00:00:00 2001 From: Junyi Date: Tue, 21 Mar 2023 12:04:37 +0700 Subject: [PATCH] fix(plugin-workflow): fix input width in request node config (#1585) --- .../plugins/workflow/src/client/nodes/request.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/plugins/workflow/src/client/nodes/request.tsx b/packages/plugins/workflow/src/client/nodes/request.tsx index 1a570e82e..0a1ab8a9a 100644 --- a/packages/plugins/workflow/src/client/nodes/request.tsx +++ b/packages/plugins/workflow/src/client/nodes/request.tsx @@ -1,5 +1,5 @@ import { ArrayItems } from '@formily/antd'; -import { css } from '@emotion/css'; +import { cx, css } from '@emotion/css'; import { NAMESPACE } from '../locale'; import { useWorkflowVariableOptions } from '../variable'; @@ -36,18 +36,11 @@ export default { title: `{{t("URL", { ns: "${NAMESPACE}" })}}`, 'x-decorator': 'FormItem', 'x-decorator-props': { - className: css` - .ant-formily-item-control-content-component{ - .ant-input-affix-wrapper, - .ant-input{ - width: 100%; - } - } - ` }, 'x-component': 'Input', 'x-component-props': { placeholder: 'https://www.nocobase.com', + className: 'full-width' }, }, headers: { @@ -153,10 +146,10 @@ export default { minRows: 10, }, placeholder: `{{t("Input request data", { ns: "${NAMESPACE}" })}}`, - className: css` + className: cx('full-width', css` font-size: 90%; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - ` + `) }, description: `{{t("Only support standard JSON data", { ns: "${NAMESPACE}" })}}`, },