import React from 'react'; import { Card } from 'antd'; import { INode } from '@antv/g6/lib/interface/item'; interface NodePanelProps { curNode: INode | null; } interface NodePanelState { } export default class Panel extends React.Component { componentDidMount() { } renderNode() { const { curNode } = this.props; return (
{curNode.getModel().label}
) } render() { const { curNode } = this.props; return ( {curNode ? this.renderNode() : "未选中"} ) } }