wujingjing
2024-12-11 3e5f676d34a0a4b418907563cba9de7480e7e2e5
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,