feat: select model in visualized modl mapping

This commit is contained in:
Bliod
2026-01-08 15:26:59 +00:00
parent 04ff3df583
commit c0a9934a2e
3 changed files with 667 additions and 335 deletions

View File

@@ -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 />}