import { CompoundedComponent } from "@/types"; import { register } from "@antv/x6-react-shape"; import { Node } from "@antv/x6"; import { ports } from "../data"; import CustomInput from "../CustomInput"; const component = ({ node }: { node: Node }) => { const { label, styles } = node.getData(); return ( <>
); }; register({ shape: "custom-react-rectangle", width: 96, height: 54, effect: ["data"], component: component, }); const Rectangle: CompoundedComponent = { name: "矩形", icon: require("./image/rectangle.png"), node: { shape: "custom-react-rectangle", data: { label: "矩形", }, ports, }, }; export default Rectangle;