From 0d8333eac618bfe9f633ba213c8780dad89b0e9b Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 15 Jan 2026 10:52:14 +0800 Subject: [PATCH] style: textarea max rows --- src/components/label-selector/wrapper.tsx | 2 +- src/components/seal-form/seal-textarea.tsx | 2 +- src/components/seal-form/wrapper/input.ts | 17 ++++++++++------- src/pages/backends/forms/basic.tsx | 2 +- src/pages/llmodels/forms/custom-backend.tsx | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/label-selector/wrapper.tsx b/src/components/label-selector/wrapper.tsx index 4ed815b3..a3c41743 100644 --- a/src/components/label-selector/wrapper.tsx +++ b/src/components/label-selector/wrapper.tsx @@ -35,7 +35,7 @@ const Container = styled.div` `; const ButtonWrapper = styled.div` - margin-top: 16px; + margin-top: 8px; `; const Wrapper: React.FC = ({ diff --git a/src/components/seal-form/seal-textarea.tsx b/src/components/seal-form/seal-textarea.tsx index 214445c4..bfe3ea46 100644 --- a/src/components/seal-form/seal-textarea.tsx +++ b/src/components/seal-form/seal-textarea.tsx @@ -99,7 +99,7 @@ const SealTextArea: React.FC = ( console.log('style=========', style, rest); return ( - + {label}} diff --git a/src/components/seal-form/wrapper/input.ts b/src/components/seal-form/wrapper/input.ts index 35b048ba..55b6e5f4 100644 --- a/src/components/seal-form/wrapper/input.ts +++ b/src/components/seal-form/wrapper/input.ts @@ -71,7 +71,6 @@ const InputWrapper = styled.div` box-shadow: none; padding-block: 5px; padding-inline: ${INPUT_INNER_PADDING}px; - height: ${INPUTHEIGHT}px !important; background-color: ${BGCOLOR}; } .ant-input.seal-textarea { @@ -87,7 +86,6 @@ const InputWrapper = styled.div` border: none; box-shadow: none; padding: 0; - height: ${INPUTHEIGHT}px !important; background-color: ${BGCOLOR}; flex: 1; @@ -112,7 +110,6 @@ const InputWrapper = styled.div` box-shadow: none; padding-block: 5px; padding-inline: ${INPUT_INNER_PADDING}px; - height: ${INPUTHEIGHT}px !important; background-color: transparent; } .ant-input.ant-input-disabled { @@ -120,7 +117,6 @@ const InputWrapper = styled.div` } input.ant-input-number-input { flex: 1; - height: ${INPUTHEIGHT}px !important; padding-block: 6px 4px; padding-inline: ${INPUT_INNER_PADDING}px; } @@ -145,6 +141,16 @@ const InputWrapper = styled.div` background-color: transparent !important; } } + + &:not(.textarea-input-wrapper) { + .ant-input, + .ant-input-password, + .ant-input-number, + .ant-input-outlined, + input.ant-input-number-input { + height: ${INPUTHEIGHT}px !important; + } + } .ant-input-search-button { position: absolute; top: -20px; @@ -166,9 +172,6 @@ const InputWrapper = styled.div` .seal-textarea-wrapper { height: auto; padding-right: 10px; - .ant-input-outlined { - height: auto !important; - } textarea { overflow-y: auto !important; } diff --git a/src/pages/backends/forms/basic.tsx b/src/pages/backends/forms/basic.tsx index 329c5b0d..4f829604 100644 --- a/src/pages/backends/forms/basic.tsx +++ b/src/pages/backends/forms/basic.tsx @@ -63,7 +63,7 @@ const BasicForm: React.FC = ({ action, currentData }) => { 'vllm serve {{model_path}} --port {{port}} --host {{worker_ip}} --served-model-name {{model_name}}' } )} - autoSize={{ minRows: 2, maxRows: 4 }} + autoSize={{ minRows: 2, maxRows: 5 }} label={intl.formatMessage({ id: 'backend.form.defaultExecuteCommand' })} diff --git a/src/pages/llmodels/forms/custom-backend.tsx b/src/pages/llmodels/forms/custom-backend.tsx index c6207a8b..92d102ed 100644 --- a/src/pages/llmodels/forms/custom-backend.tsx +++ b/src/pages/llmodels/forms/custom-backend.tsx @@ -65,7 +65,7 @@ const CustomBackend: React.FC = () => { required scaleSize={false} alwaysFocus={true} - autoSize={{ minRows: 2, maxRows: 4 }} + autoSize={{ minRows: 2, maxRows: 5 }} onBlur={handleRunCommandOnBlur} label={intl.formatMessage({ id: 'backend.runCommand' })} description={intl.formatMessage({