refactor(web): 优化流程节点的定义和实现
This commit is contained in:
@@ -1,40 +1,20 @@
|
||||
import {amisRender, commonInfo} from '../util/amis.tsx'
|
||||
import {useState} from 'react'
|
||||
import FlowEditor, {type GraphData} from '../components/flow/FlowEditor.tsx'
|
||||
|
||||
function Test() {
|
||||
const [graphData] = useState<GraphData>({
|
||||
nodes: [],
|
||||
edges: [],
|
||||
data: {},
|
||||
})
|
||||
|
||||
return (
|
||||
<div>
|
||||
{amisRender(
|
||||
{
|
||||
debug: commonInfo.debug,
|
||||
type: 'form',
|
||||
canAccessSuperData: false,
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '重置',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '提交',
|
||||
},
|
||||
],
|
||||
body: [
|
||||
{
|
||||
type: 'input-file',
|
||||
required: true,
|
||||
name: 'files',
|
||||
label: '数据文件',
|
||||
autoUpload: false,
|
||||
drag: true,
|
||||
multiple: true,
|
||||
accept: '*',
|
||||
maxSize: 104857600,
|
||||
receiver: `${commonInfo.baseAiUrl}/upload`,
|
||||
useChunk: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
)}
|
||||
<div className="h-screen">
|
||||
<FlowEditor
|
||||
inputSchema={{}}
|
||||
graphData={graphData}
|
||||
onGraphDataChange={data => console.log(data)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user