npm install --save flow-design-core
import FlowDesigner from 'flow-design-core';
import widgets from './widgets'
function App() {
const [metadata, onMetadataChange] = React.useState({
items: []
})
return (
<div style={{
margin: "30px auto",
width: 1400,
minHeight: 500
}}>
<FormDesigner widgets={widgets} metadata={metadata} onChange={onMetadataChange} />
</div>
);
}
ReactDOM.render(<App />, document.getElementById('root'))
设计器控件列表
eg:
{
items: []
}
布局发生改变时触发