generated from arvinxx/npm-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🐛 fix: edge params * ✨ feat: version --------- Co-authored-by: jiangchu <[email protected]>
- Loading branch information
Showing
5 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* compact: true | ||
* defaultShowCode: true | ||
*/ | ||
import { FlowView } from '@ant-design/pro-flow'; | ||
import useStyles from './css/index.style'; | ||
// import { edges, nodes } from './data/data3'; | ||
|
||
const GroupNode = () => { | ||
return ( | ||
<div | ||
style={{ | ||
width: 500, | ||
height: 800, | ||
backgroundColor: 'red', | ||
}} | ||
></div> | ||
); | ||
}; | ||
|
||
const nodeTypes = { GroupNode }; | ||
|
||
const nodes = [ | ||
{ | ||
id: '1', | ||
type: 'GroupNode', | ||
position: { x: 0, y: 0 }, | ||
zIndex: -1, | ||
}, | ||
{ | ||
id: '2', | ||
position: { x: 50, y: 10 }, | ||
parentNode: '1', | ||
extent: 'parent', | ||
}, | ||
{ | ||
id: '3', | ||
position: { x: 50, y: 190 }, | ||
parentNode: '1', | ||
extent: 'parent', | ||
}, | ||
]; | ||
|
||
const edges = [ | ||
{ | ||
id: 'e1', | ||
source: '2', | ||
target: '3', | ||
}, | ||
]; | ||
|
||
function App() { | ||
const { styles } = useStyles(); | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<FlowView nodeTypes={nodeTypes} nodes={nodes} edges={edges} autoLayout={false}></FlowView> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters