import React from 'react'; import CircleServe from './mapServe'; import { Badge } from 'antd'; import { useXFlowApp, XFlowNodeCommands } from '@antv/xflow'; export { CircleServe }; export default function CustomRect(props) { const { size = { width: 90, height: 90 }, data } = props; const { width, height } = size; const { label, stroke, fill, fontFill, fontSize } = data; const app = useXFlowApp(); const handleClick = () => { // console.log(data); app.executeCommand(XFlowNodeCommands.SELECT_NODE.id, { nodeId: data.id, }); // console.log('XFlowNodeCommands.SELECT_NODE.id', data); // message.success(`${XFlowNodeCommands.SELECT_NODE.label}: 命令执行成功`); }; return (
{label}
); }