import { Node, Graph } from "@antv/x6"; import BaseComponentRender from "../component/BaseComponentRender"; import "@antv/x6-vue-shape"; /** * 规则编排-节点/边 */ export default class FlowNode extends BaseComponentRender { public $node: Node.Properties | undefined; protected render(): void { let { props, style, attribute } = this.$options; if (props.type === "vue") { let { name, options } = props.registerOption; console.log(this.$options, "options"); Graph.registerVueComponent(name, options, true); style.data = attribute.data; this.$node = style as Node.Properties; } else { this.$node = style; } // this.$node.on("change:data", ({ current }) => { // console.log(current); // }); } protected create(callback: (el: undefined) => void): void { callback(undefined); } }