From 60197fde6be7b7567bf16524ba1eb227775a6fc8 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期二, 19 十一月 2024 11:51:35 +0800 Subject: [PATCH] amis 集成至项目 --- src/components/graph/treeGraph/TreeGraph.vue | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/graph/treeGraph/TreeGraph.vue b/src/components/graph/treeGraph/TreeGraph.vue index 0e6e7db..4cf319d 100644 --- a/src/components/graph/treeGraph/TreeGraph.vue +++ b/src/components/graph/treeGraph/TreeGraph.vue @@ -1,5 +1,5 @@ <template> - <div class="h-full w-full bg-white relative flex flex-col"> + <div class="h-full w-full bg-white relative flex flex-col"> <!-- <div class="toolbar flex-0 border-x-0 border-b border-t-0 border-gray-200 border-solid flex-items-center"> <span> 鏍煎紡 @@ -147,11 +147,12 @@ selfAdapt(); } }; -const rebuildGraph = async(extraOption: DeepPartial<GraphOptions>) => { +const rebuildGraph = async (extraOption: DeepPartial<GraphOptions>) => { const finalOptions = defaultsDeep(extraOption, commonOption); graph.setOptions(finalOptions); - await graphRender(); - graph.fitCenter(); + await graph.render(); + // graph.fitCenter(); + selfAdapt(); }; let commonOption: GraphOptions; @@ -207,8 +208,15 @@ behaviors: [ 'drag-canvas', 'zoom-canvas', + // 'drag-element', { + key: 'collapse-expand', + type: 'collapse-expand', + trigger: 'click', + }, + + { key: 'hover-activate', type: 'hover-activate', degree: 5, -- Gitblit v1.9.3