|
@@ -1,9 +1,8 @@
|
|
|
import { buildUUID } from '@/utils/uuid'
|
|
|
-import { SolutionOutlined } from '@ant-design/icons'
|
|
|
+import { PlusOutlined, SolutionOutlined } from '@ant-design/icons'
|
|
|
import { Button, Popover } from 'antd'
|
|
|
import React, { useMemo, useState, useContext } from 'react'
|
|
|
import type { EdgeProps } from 'react-flow-renderer'
|
|
|
-import { isNode } from 'react-flow-renderer'
|
|
|
import { getBezierPath, getEdgeCenter, getMarkerEnd, useStoreState } from 'react-flow-renderer'
|
|
|
import { Actions, eId, FlowContext } from '../../context'
|
|
|
import { generateElements, genreateElementEnum, getEdgeParams } from '../../utils'
|
|
@@ -12,7 +11,6 @@ import styles from './index.less'
|
|
|
import 'antd/lib/button/style/css'
|
|
|
import consts from '@/utils/consts'
|
|
|
import useLoading from '../../hooks/useLoading'
|
|
|
-import IconFont from '@/components/IconFont'
|
|
|
import { ConfigureType } from '../../enum'
|
|
|
const foreignObjectSize = 50
|
|
|
|
|
@@ -47,9 +45,7 @@ export function CommonEdge(props: EdgeProps) {
|
|
|
}
|
|
|
const showBtn =
|
|
|
flowData.get(source) && target === eId
|
|
|
- ? flowData
|
|
|
- .get(source)
|
|
|
- ?.accounts.every(item => !item.configure.includes(ConfigureType.NEXTSECTOR))
|
|
|
+ ? flowData.get(source)?.accounts.every(item => !item.configure.includes(ConfigureType.NEXTSECTOR))
|
|
|
: true
|
|
|
|
|
|
const nodes = useStoreState(store => store.nodes)
|
|
@@ -158,7 +154,7 @@ export function CommonEdge(props: EdgeProps) {
|
|
|
onVisibleChange={togglePopver}
|
|
|
overlayClassName="flow-popover">
|
|
|
<Button
|
|
|
- icon={<IconFont type="icon-plus" />}
|
|
|
+ icon={<PlusOutlined />}
|
|
|
shape="circle"
|
|
|
size="small"
|
|
|
onClick={event => onEdgeClick(event, id)}
|