https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241014/36c0dda36655c41b8e1ee088a55df4e9.png import { Graph } from "@antv/x6"; const data = { // 节点 nodes: [ { id: "node1", // String,可选,节点的唯一标识 x: 40, // Number,必选,节点位置的 x 值 y: 40, // Number,必选,节点位置的 y 值 width: 80, // Number,可选,节点大小的 width 值 height: 40, // Number,可选,节点大小的 height 值 label: "hellohellohellohellohellohellohellohellohello", // String,节点标签 }, { id: "node2", // String,节点的唯一标识 shape: "ellipse", // 使用 ellipse 渲染 x: 40, // Number,必选,节点位置的 x 值 y: 160, // Number,必选,节点位置的 y 值 width: 80, // Number,可选,节点大小的 width 值 height: 40, // Number,可选,节点大小的 height 值 label: "world" // String,节点标签 } ], // 边 edges: [ { source: "node1", // String,必须,起始节点 id target: "node2" // String,必须,目标节点 id } ] }; export default { name: "HelloWorld", props: { msg: String }, data() { return {}; }, mounted() { const graph = new Graph({ container: document.getElementById("container"), width: 800, height: 600, background: { color: "#fffbe6" // 设置画布背景颜色 }, grid: { size: 10, // 网格大小 10px visible: true // 渲染网格背景 } }); graph.fromJSON(data); } }; label: "hellohellohellohellohellohellohellohellohello", // String,节点标签 这个会超出id: "node1", // String,可选,节点的唯一标识这个宽,我又不想截断这个字符串,有没有添加 类似 popover这样的功能