fix: 看板Hooks数据复位

This commit is contained in:
TsMask
2024-04-17 10:48:53 +08:00
parent 662583c73b
commit 432666b1ab
5 changed files with 68 additions and 24 deletions

View File

@@ -76,7 +76,7 @@ function fnGraphEvent(graph: Graph) {
// 节点点击
graph.on('node:click', evt => {
// 获得鼠标当前目标节点
const node = evt.item?.getModel();
const node = evt.item?.getModel();
if (node && node.id && !notNeNodes.includes(node.id)) {
graphNodeClickID.value = node.id;
}
@@ -129,6 +129,9 @@ function handleRanderGraph(
var observer = new ResizeObserver(function (entries) {
// 当元素大小发生变化时触发回调函数
entries.forEach(function (entry) {
if (!graphG6.value) {
return;
}
graphG6.value.changeSize(
entry.contentRect.width,
entry.contentRect.height - 30