chore: allow space in backend parameters

This commit is contained in:
jialin
2025-12-01 10:06:00 +08:00
parent 769cc09906
commit 14f0afec08
5 changed files with 32 additions and 12 deletions
+4 -3
View File
@@ -1,4 +1,3 @@
import { useIntl } from '@umijs/max';
import _ from 'lodash';
import React from 'react';
import Wrapper from '../label-selector/wrapper';
@@ -12,13 +11,13 @@ interface ListInputProps {
options?: Global.HintOptions[];
placeholder?: string;
labelExtra?: React.ReactNode;
trim?: boolean;
onChange: (data: string[]) => void;
onBlur?: (e: any, index: number) => void;
onDelete?: (index: number) => void;
}
const ListInput: React.FC<ListInputProps> = (props) => {
const intl = useIntl();
const {
dataList,
label,
@@ -28,7 +27,8 @@ const ListInput: React.FC<ListInputProps> = (props) => {
onDelete,
btnText,
options,
labelExtra
labelExtra,
trim = true
} = props;
const [list, setList] = React.useState<{ value: string; uid: number }[]>([]);
const countRef = React.useRef(0);
@@ -97,6 +97,7 @@ const ListInput: React.FC<ListInputProps> = (props) => {
onBlur={(e) => onBlur?.(e, index)}
onRemove={() => handleOnRemove(index)}
onChange={(val) => handleOnChange(val, index)}
trim={trim}
/>
);
})}