|
|
|
|
@ -76,6 +76,7 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
) : (
|
|
|
|
|
<Input
|
|
|
|
|
value={record.id}
|
|
|
|
|
autoWidth={{ minWidth: 50, maxWidth: 100 }}
|
|
|
|
|
onChange={(value) => handleSave({ ...record, id: value })}
|
|
|
|
|
/>
|
|
|
|
|
)
|
|
|
|
|
@ -89,7 +90,7 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
<span>{record.dataType === 'INTEGER' ? '整数' : record.dataType}</span>
|
|
|
|
|
) : (
|
|
|
|
|
<Select
|
|
|
|
|
autoWidth={{ minWidth: 200, maxWidth: 500 }}
|
|
|
|
|
autoWidth={{ minWidth: 150, maxWidth: 200 }}
|
|
|
|
|
options={dataTypeOptions}
|
|
|
|
|
value={record.dataType}
|
|
|
|
|
onChange={(value) => handleSave({ ...record, dataType: value })}
|
|
|
|
|
@ -104,14 +105,14 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
render: (_: any, record: TableDataItem) => (
|
|
|
|
|
record.dataType === 'ARRAY' ? (
|
|
|
|
|
<Select
|
|
|
|
|
autoWidth={{ minWidth: 200, maxWidth: 500 }}
|
|
|
|
|
autoWidth={{ minWidth: 150, maxWidth: 200 }}
|
|
|
|
|
options={arrayTypeOptions}
|
|
|
|
|
value={record.arrayType}
|
|
|
|
|
onChange={(value) => handleSave({ ...record, arrayType: value })}
|
|
|
|
|
placeholder="请选择数组类型"
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<span></span>
|
|
|
|
|
<div style={{ minWidth: 70, maxWidth: 100 }}>-</div>
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
@ -151,9 +152,10 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
allowClear
|
|
|
|
|
options={options}
|
|
|
|
|
style={{ width: '100%', minWidth: 100 }}
|
|
|
|
|
autoWidth={{ minWidth: 150, maxWidth: 200 }}
|
|
|
|
|
/>
|
|
|
|
|
<Input
|
|
|
|
|
style={{ width: '100%', minWidth: 100, marginTop: 10 }}
|
|
|
|
|
style={{ width: '100%', minWidth: 150, maxWidth: 200, marginTop: 10 }}
|
|
|
|
|
value={record.defaultValue}
|
|
|
|
|
onChange={(value) => handleSave({ ...record, defaultValue: value })}
|
|
|
|
|
placeholder="请输入默认值"
|
|
|
|
|
@ -166,6 +168,7 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
if (record.id === 'maxTime') {
|
|
|
|
|
return (
|
|
|
|
|
<Input
|
|
|
|
|
style={{ width: '100%', minWidth: 150, maxWidth: 200, marginTop: 10 }}
|
|
|
|
|
type="number"
|
|
|
|
|
min="1"
|
|
|
|
|
step="1"
|
|
|
|
|
@ -177,6 +180,7 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Input
|
|
|
|
|
style={{ width: '100%', minWidth: 150, maxWidth: 200, marginTop: 10 }}
|
|
|
|
|
value={record.defaultValue}
|
|
|
|
|
onChange={(value) => handleSave({ ...record, defaultValue: value })}
|
|
|
|
|
placeholder="请输入默认值"
|
|
|
|
|
@ -189,7 +193,8 @@ const ParamsTable: React.FC<ParamsTableProps> = ({
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'op',
|
|
|
|
|
render: (_: any, record: TableDataItem) => (
|
|
|
|
|
record.id !== 'maxTime' && <Button onClick={() => removeRow(record.key)} type="text" status="danger">
|
|
|
|
|
record.id !== 'maxTime' &&
|
|
|
|
|
<Button onClick={() => removeRow(record.key)} type="text" status="danger" style={{ maxWidth: 40 }}>
|
|
|
|
|
<IconDelete />
|
|
|
|
|
</Button>
|
|
|
|
|
)
|
|
|
|
|
|