style: textarea max rows
This commit is contained in:
@@ -35,7 +35,7 @@ const Container = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const ButtonWrapper = styled.div`
|
const ButtonWrapper = styled.div`
|
||||||
margin-top: 16px;
|
margin-top: 8px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Wrapper: React.FC<WrapperProps> = ({
|
const Wrapper: React.FC<WrapperProps> = ({
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ const SealTextArea: React.FC<InputTextareaProps & SealFormItemProps> = (
|
|||||||
console.log('style=========', style, rest);
|
console.log('style=========', style, rest);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InputWrapper>
|
<InputWrapper className="textarea-input-wrapper">
|
||||||
<Wrapper
|
<Wrapper
|
||||||
status={status}
|
status={status}
|
||||||
label={label && <LabelWrapper>{label}</LabelWrapper>}
|
label={label && <LabelWrapper>{label}</LabelWrapper>}
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ const InputWrapper = styled.div`
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding-block: 5px;
|
padding-block: 5px;
|
||||||
padding-inline: ${INPUT_INNER_PADDING}px;
|
padding-inline: ${INPUT_INNER_PADDING}px;
|
||||||
height: ${INPUTHEIGHT}px !important;
|
|
||||||
background-color: ${BGCOLOR};
|
background-color: ${BGCOLOR};
|
||||||
}
|
}
|
||||||
.ant-input.seal-textarea {
|
.ant-input.seal-textarea {
|
||||||
@@ -87,7 +86,6 @@ const InputWrapper = styled.div`
|
|||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: ${INPUTHEIGHT}px !important;
|
|
||||||
background-color: ${BGCOLOR};
|
background-color: ${BGCOLOR};
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
@@ -112,7 +110,6 @@ const InputWrapper = styled.div`
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding-block: 5px;
|
padding-block: 5px;
|
||||||
padding-inline: ${INPUT_INNER_PADDING}px;
|
padding-inline: ${INPUT_INNER_PADDING}px;
|
||||||
height: ${INPUTHEIGHT}px !important;
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
.ant-input.ant-input-disabled {
|
.ant-input.ant-input-disabled {
|
||||||
@@ -120,7 +117,6 @@ const InputWrapper = styled.div`
|
|||||||
}
|
}
|
||||||
input.ant-input-number-input {
|
input.ant-input-number-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: ${INPUTHEIGHT}px !important;
|
|
||||||
padding-block: 6px 4px;
|
padding-block: 6px 4px;
|
||||||
padding-inline: ${INPUT_INNER_PADDING}px;
|
padding-inline: ${INPUT_INNER_PADDING}px;
|
||||||
}
|
}
|
||||||
@@ -145,6 +141,16 @@ const InputWrapper = styled.div`
|
|||||||
background-color: transparent !important;
|
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 {
|
.ant-input-search-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -20px;
|
top: -20px;
|
||||||
@@ -166,9 +172,6 @@ const InputWrapper = styled.div`
|
|||||||
.seal-textarea-wrapper {
|
.seal-textarea-wrapper {
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
.ant-input-outlined {
|
|
||||||
height: auto !important;
|
|
||||||
}
|
|
||||||
textarea {
|
textarea {
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const BasicForm: React.FC<AddModalProps> = ({ action, currentData }) => {
|
|||||||
'vllm serve {{model_path}} --port {{port}} --host {{worker_ip}} --served-model-name {{model_name}}'
|
'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({
|
label={intl.formatMessage({
|
||||||
id: 'backend.form.defaultExecuteCommand'
|
id: 'backend.form.defaultExecuteCommand'
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const CustomBackend: React.FC = () => {
|
|||||||
required
|
required
|
||||||
scaleSize={false}
|
scaleSize={false}
|
||||||
alwaysFocus={true}
|
alwaysFocus={true}
|
||||||
autoSize={{ minRows: 2, maxRows: 4 }}
|
autoSize={{ minRows: 2, maxRows: 5 }}
|
||||||
onBlur={handleRunCommandOnBlur}
|
onBlur={handleRunCommandOnBlur}
|
||||||
label={intl.formatMessage({ id: 'backend.runCommand' })}
|
label={intl.formatMessage({ id: 'backend.runCommand' })}
|
||||||
description={intl.formatMessage({
|
description={intl.formatMessage({
|
||||||
|
|||||||
Reference in New Issue
Block a user