fix: json schem ui problem

This commit is contained in:
Joel
2025-07-01 11:07:00 +08:00
parent 68e9081d05
commit a0621c61d3
3 changed files with 5 additions and 3 deletions

View File

@ -231,7 +231,6 @@ const FormInputItem: FC<Props> = ({
value={varInput?.value as any}
isExpand
isInNode
height={100}
language={CodeLanguage.json}
onChange={handleValueChange}
className='w-full'

View File

@ -2,8 +2,10 @@ import type { FC } from 'react'
import type { SchemaRoot } from '../../../types'
import SchemaNode from './schema-node'
import { useSchemaNodeOperations } from './hooks'
import cn from '@/utils/classnames'
export type VisualEditorProps = {
className?: string
schema: SchemaRoot
rootName?: string
readOnly?: boolean
@ -11,11 +13,11 @@ export type VisualEditorProps = {
}
const VisualEditor: FC<VisualEditorProps> = (props) => {
const { schema, readOnly } = props
const { className, schema, readOnly } = props
useSchemaNodeOperations(props)
return (
<div className='h-full overflow-auto rounded-xl bg-background-section-burn p-1 pl-2'>
<div className={cn('h-full overflow-auto rounded-xl bg-background-section-burn p-1 pl-2', className)}>
<SchemaNode
name={props.rootName || 'structured_output'}
schema={schema}