1- import { Popover , Tooltip , Typography } from 'antd' ;
1+ import { Popover , Typography } from 'antd' ;
22import classNames from 'classnames' ;
33import React , { memo , useMemo } from 'react' ;
44import createIconFont from '../../utils/createIconFont' ;
@@ -18,7 +18,7 @@ export default memo((props: any) => {
1818 hideDesc,
1919 NodeWidget,
2020 iconFontUrl,
21- iconSvg
21+ iconSvg,
2222 } = props ;
2323 const IconBox = useMemo ( ( ) => createIconFont ( iconFontUrl ) , [ iconFontUrl ] ) ;
2424 return (
@@ -28,14 +28,16 @@ export default memo((props: any) => {
2828 } ) }
2929 onClick = { onClick }
3030 >
31- < div className = ' node-title' >
31+ < div className = " node-title" >
3232 < Popover
33- title = { < MenuTooltip { ...props } /> }
34- placement = 'bottomLeft'
35- trigger = 'click'
36- getPopupContainer = { ( ) => document . getElementById ( 'xflow-container' ) as HTMLElement }
33+ content = { < MenuTooltip { ...props } /> }
34+ placement = "bottomLeft"
35+ trigger = "hover"
36+ getPopupContainer = { ( ) =>
37+ document . getElementById ( 'xflow-container' ) as HTMLElement
38+ }
3739 >
38- < Tooltip
40+ { /* <Tooltip
3941 title='点击图标查看节点信息'
4042 arrow={false}
4143 placement='topLeft'
@@ -45,11 +47,11 @@ export default memo((props: any) => {
4547 fontSize: '12px',
4648 }}
4749 getPopupContainer={() => document.getElementById('xflow-container') as HTMLElement}
48- >
49- < span className = ' icon-box' style = { { background : icon ?. bgColor } } >
50- { iconSvg ? iconSvg : < IconBox { ...icon } /> }
51- </ span >
52- </ Tooltip >
50+ > */ }
51+ < span className = " icon-box" style = { { background : icon ?. bgColor } } >
52+ { iconSvg ? iconSvg : < IconBox { ...icon } /> }
53+ </ span >
54+ { /* </Tooltip> */ }
5355 </ Popover >
5456 < Text
5557 style = { { width : 188 , marginLeft : '8px' } }
@@ -62,16 +64,17 @@ export default memo((props: any) => {
6264 color : '#354052' ,
6365 fontSize : '12px' ,
6466 } ,
65- getPopupContainer :( ) => document . getElementById ( 'xflow-container' ) as HTMLElement
67+ getPopupContainer : ( ) =>
68+ document . getElementById ( 'xflow-container' ) as HTMLElement ,
6669 } ,
6770 } }
6871 >
6972 { title }
7073 </ Text >
7174 </ div >
7275
73- < div className = ' node-body' > { children } </ div >
74- { NodeWidget && < div className = ' node-widget' > { NodeWidget } </ div > }
76+ < div className = " node-body" > { children } </ div >
77+ { NodeWidget && < div className = " node-widget" > { NodeWidget } </ div > }
7578 { ! hideDesc && ! ! desc && (
7679 < Paragraph
7780 ellipsis = { {
@@ -84,10 +87,11 @@ export default memo((props: any) => {
8487 color : '#354052' ,
8588 fontSize : '12px' ,
8689 } ,
87- getPopupContainer : ( ) => document . getElementById ( 'xflow-container' ) as HTMLElement
90+ getPopupContainer : ( ) =>
91+ document . getElementById ( 'xflow-container' ) as HTMLElement ,
8892 } ,
8993 } }
90- className = ' node-desc'
94+ className = " node-desc"
9195 >
9296 { desc }
9397 </ Paragraph >
0 commit comments