feat: select model in visualized modl mapping
This commit is contained in:
@@ -60,6 +60,7 @@ const JSONEditor = ({
|
||||
editorType = 'keyValue',
|
||||
rules = [],
|
||||
formApi = null,
|
||||
renderStringValueSuffix,
|
||||
...props
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -335,7 +336,7 @@ const JSONEditor = ({
|
||||
]);
|
||||
|
||||
// 渲染值输入控件(支持嵌套)
|
||||
const renderValueInput = (pairId, value) => {
|
||||
const renderValueInput = (pairId, pairKey, value) => {
|
||||
const valueType = typeof value;
|
||||
|
||||
if (valueType === 'boolean') {
|
||||
@@ -387,6 +388,7 @@ const JSONEditor = ({
|
||||
<Input
|
||||
placeholder={t('参数值')}
|
||||
value={String(value)}
|
||||
suffix={renderStringValueSuffix?.({ pairId, pairKey, value })}
|
||||
onChange={(newValue) => {
|
||||
let convertedValue = newValue;
|
||||
if (newValue === 'true') convertedValue = true;
|
||||
@@ -470,7 +472,9 @@ const JSONEditor = ({
|
||||
)}
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={12}>{renderValueInput(pair.id, pair.value)}</Col>
|
||||
<Col span={12}>
|
||||
{renderValueInput(pair.id, pair.key, pair.value)}
|
||||
</Col>
|
||||
<Col span={2}>
|
||||
<Button
|
||||
icon={<IconDelete />}
|
||||
|
||||
Reference in New Issue
Block a user