qymljy пре 2 година
родитељ
комит
4a0a16d975

+ 4 - 4
src/components/mindmap/custom.vue

@@ -68,10 +68,10 @@ const getNodeConfig = (node) => {
   switch (node.type) {
     case 'root': {
       config = {
-        basicColor: '#E3E6E8',
+        basicColor: node.color,
         fontColor: 'rgba(0,0,0,0.85)',
         borderColor: '#E3E6E8',
-        bgColor: '#5b8ff9',
+        bgColor: node.color,
       };
       break;
     }
@@ -438,7 +438,7 @@ export default {
       // this.data = this.createMenu([res.data.data])
       const container = document.getElementById('container');
       const width = container.scrollWidth;
-      const height = container.scrollHeight || 500;
+      const height = container.scrollHeight -50  || 500;
       const graph = new G6.TreeGraph({
         container: 'container',
         width,
@@ -459,7 +459,7 @@ export default {
           type: 'dendrogram',
           direction: 'RL',
           nodeSep: 100,
-          rankSep: 500,
+          rankSep: 330,
           radial: true,
         },
       });

+ 2 - 2
src/components/mindmap/project.vue

@@ -436,7 +436,7 @@ export default {
 
       const container = document.getElementById('container');
       const width = container.scrollWidth;
-      const height = container.scrollHeight - 100 || 500;
+      const height = container.scrollHeight - 50 || 500;
       const graph = new G6.TreeGraph({
         container: 'container',
         width,
@@ -457,7 +457,7 @@ export default {
           type: 'dendrogram',
           direction: 'RL',
           nodeSep: 100,
-          rankSep: 500,
+          rankSep: 350,
           radial: true,
         },
       });

+ 2 - 2
src/components/mindmap/saler.vue

@@ -437,7 +437,7 @@ export default {
       })
       const container = document.getElementById('container');
       const width = container.scrollWidth;
-      const height = container.scrollHeight || 500;
+      const height = container.scrollHeight -50 || 500;
       const graph = new G6.TreeGraph({
         container: 'container',
         width,
@@ -458,7 +458,7 @@ export default {
           type: 'dendrogram',
           direction: 'RL',
           nodeSep: 100,
-          rankSep: 550,
+          rankSep: 520,
           radial: true,
         },
       });