You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letcanvasData={groups: [id: String;//requireleft: Number//requiretop: Number//requirerender: String|Object;//optional(If it is String type, it needs to follow template syntax)// (If it is Object type, it needs to follow .vue syntax)//Other Options see https://github.com/alibaba/butterfly/blob/master/docs/zh-CN/group.md],nodes: [id: String;//requirerender: String|Object;//optional(If it is String type, it needs to follow template syntax)// (If it is Object type, it needs to follow .vue syntax)//Other Options see https://github.com/alibaba/butterfly/blob/master/docs/zh-CN/node.md#node-attr],edges: [id: String;//requirerender: String|Object;//optional(If it is String type, it needs to follow template syntax)// (If it is Object type, it needs to follow .vue syntax)//Other Options see https://github.com/alibaba/butterfly/blob/master/docs/zh-CN/edge.md]}
canvasData.render Render mode (two)
Two modeString|Object
Object type (.vue) Recommended
// grid-node.vue
<template>
<divclass="grid-node">
{{itemData.label}}
</div>
</template>
<script>
exportdefault { name:"grid-node", props: {// Here you can get the data of the current node in mockdata itemData: { type:Object, },// Native node data (not recommended) canvasNode: { type:Object } }, methods: { },created() { }};
</script>
<style scoped>
.grid-node {width: 30px;height: 30px;line-height: 30px;text-align: center;border-radius: 50%;border: 1pxsolid#aaa;color: #FFF;background-color: #F66902; }
</style>