提交 f2d57e97 authored 作者: coderBryanFu's avatar coderBryanFu

feat:update

差异被折叠。
...@@ -18,7 +18,11 @@ ...@@ -18,7 +18,11 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
<<<<<<< HEAD
"@antv/g6": "^5.0.51", "@antv/g6": "^5.0.51",
=======
"@antv/g6": "^4.8.24",
>>>>>>> bcccf5986756021846ec7ffd1850352eae45f26c
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@kangc/v-md-editor": "^2.3.18", "@kangc/v-md-editor": "^2.3.18",
"@microsoft/fetch-event-source": "^2.0.1", "@microsoft/fetch-event-source": "^2.0.1",
......
<template> <template>
<div class="relation-graph-wrapper"> <div class="relation-graph-wrapper">
<div class="graph-controls"> <div class="graph-controls">
<div <div v-for="item in controlBtns" :key="item.type"
v-for="item in controlBtns"
:key="item.type"
:class="['control-btn', { 'control-btn-active': currentLayoutType === item.type }]" :class="['control-btn', { 'control-btn-active': currentLayoutType === item.type }]"
@click="handleClickControlBtn(item.type)" @click="handleClickControlBtn(item.type)">
>
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
</div> </div>
...@@ -33,10 +30,8 @@ ...@@ -33,10 +30,8 @@
<script setup> <script setup>
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue' import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue'
// import G6 from '@antv/g6' import { Graph, TreeGraph } from '@antv/g6'
import G6 from '@antv/g6/dist/g6.min';
import { Close } from '@element-plus/icons-vue' import { Close } from '@element-plus/icons-vue'
import echartsIcon01 from '../assets/echartsicon01.png' import echartsIcon01 from '../assets/echartsicon01.png'
import echartsIcon02 from '../assets/echartsicon02.png' import echartsIcon02 from '../assets/echartsicon02.png'
import echartsIcon03 from '../assets/echartsicon03.png' import echartsIcon03 from '../assets/echartsicon03.png'
...@@ -108,7 +103,7 @@ const initNormalGraph = (layoutType, width, height) => { ...@@ -108,7 +103,7 @@ const initNormalGraph = (layoutType, width, height) => {
alphaMin: 0.001 alphaMin: 0.001
} }
graphInstance.value = new G6.Graph({ graphInstance.value = new Graph({
container: containerRef.value, container: containerRef.value,
width, width,
height, height,
...@@ -237,7 +232,7 @@ const initCircularGraph = (width, height) => { ...@@ -237,7 +232,7 @@ const initCircularGraph = (width, height) => {
centerNode.fy = centerY centerNode.fy = centerY
} }
graphInstance.value = new G6.Graph({ graphInstance.value = new Graph({
container: containerRef.value, container: containerRef.value,
width, width,
height, height,
...@@ -343,7 +338,7 @@ const initTreeGraph = (width, height) => { ...@@ -343,7 +338,7 @@ const initTreeGraph = (width, height) => {
if (!treeDataSource) return if (!treeDataSource) return
graphInstance.value = new G6.TreeGraph({ graphInstance.value = new TreeGraph({
container: containerRef.value, container: containerRef.value,
width, width,
height, height,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论