This commit is contained in:
dengqichen 2024-12-20 09:36:39 +08:00
parent 9433287919
commit 0e4125a469

View File

@ -50,10 +50,6 @@ const FormRenderer: React.FC<{
readOnly?: boolean; readOnly?: boolean;
}> = ({ schema, path = '', readOnly = false }) => { }> = ({ schema, path = '', readOnly = false }) => {
if (!schema || !schema.properties) return null; if (!schema || !schema.properties) return null;
console.log('Current path:', path);
console.log('Properties:', Object.keys(schema.properties));
const renderPortConfig = (portSchema: any, portPath: string) => { const renderPortConfig = (portSchema: any, portPath: string) => {
if (!portSchema || !portSchema.properties) return null; if (!portSchema || !portSchema.properties) return null;
@ -297,28 +293,16 @@ const NodeDesignForm: React.FC = () => {
}} }}
> >
<div style={{ display: 'flex', gap: '24px', padding: '24px' }}> <div style={{ display: 'flex', gap: '24px', padding: '24px' }}>
<Card <Tabs
style={{ tabPosition="left"
width: 280, type="card"
height: 'fit-content', activeKey={selectedNode?.nodeCode || ''}
borderRadius: '8px', onChange={(key) => {
boxShadow: '0 1px 2px rgba(0,0,0,0.03)' const node = nodeDefinitionsDefined.find(n => n.nodeCode === key);
if (node) {
handleNodeSelect(node);
}
}} }}
styles={{
body: { padding: 0 }
}}
>
<div style={{
padding: '16px',
borderBottom: '1px solid #f0f0f0',
fontWeight: 500,
fontSize: '14px',
color: '#333'
}}>
</div>
<Menu
selectedKeys={[selectedNode?.nodeCode || '']}
items={nodeDefinitionsDefined.map(node => ({ items={nodeDefinitionsDefined.map(node => ({
key: node.nodeCode, key: node.nodeCode,
label: ( label: (
@ -336,23 +320,10 @@ const NodeDesignForm: React.FC = () => {
</div> </div>
) )
}))} }))}
onClick={({ key }) => {
const node = nodeDefinitionsDefined.find(n => n.nodeCode === key);
if (node) {
handleNodeSelect(node);
}
}}
style={{ border: 'none', padding: '8px 0' }}
/> />
</Card>
<Card <Card
style={{ style={{
flex: 1, flex: 1,
borderRadius: '8px',
boxShadow: '0 1px 2px rgba(0,0,0,0.03)'
}}
styles={{
body: { padding: '24px' }
}} }}
> >
<Form <Form
@ -382,11 +353,6 @@ const NodeDesignForm: React.FC = () => {
</div> </div>
) : null ) : null
}))} }))}
style={{
marginTop: '-16px',
marginLeft: '-16px',
marginRight: '-16px'
}}
/> />
</Form> </Form>
</Card> </Card>