bug: clone data err

This commit is contained in:
张金龙 2020-10-11 23:33:18 +08:00
parent 025be2d4a4
commit 1c39627e94
2 changed files with 6 additions and 6 deletions

View File

@ -235,7 +235,7 @@ const SourceBox = memo((props: SourceBoxProps) => {
/> />
</Tooltip> </Tooltip>
{clonePointData.length > 0 ? ( {pointData.length > 0 ? (
<GridLayout <GridLayout
className={styles.layout} className={styles.layout}
cols={24} cols={24}
@ -246,15 +246,14 @@ const SourceBox = memo((props: SourceBoxProps) => {
onDragStart={onDragStart} onDragStart={onDragStart}
onResizeStop={onResizeStop} onResizeStop={onResizeStop}
> >
{clonePointData.map(value => ( {pointData.map(value => (
<div <div
className={value.isMenu ? styles.selected : styles.dragItem} className={value.isMenu ? styles.selected : styles.dragItem}
key={value.id} key={value.id}
data-grid={value.point} data-grid={value.point}
onMouseDownCapture={e => handleCurrentCard(e, true, value.id)}
> >
<DynamicEngine {...value.item} isTpl={false} /> <DynamicEngine {...value.item} isTpl={false} />
<div {/* <div
className={styles.tooltip} className={styles.tooltip}
style={{ display: value.isMenu ? 'block' : 'none' }} style={{ display: value.isMenu ? 'block' : 'none' }}
> >
@ -264,7 +263,7 @@ const SourceBox = memo((props: SourceBoxProps) => {
<div className="tooltipRow2"> <div className="tooltipRow2">
<a></a> <a></a>
</div> </div>
</div> </div> */}
</div> </div>
))} ))}
</GridLayout> </GridLayout>
@ -397,6 +396,7 @@ const SourceBox = memo((props: SourceBoxProps) => {
pointData, pointData,
scaleNum, scaleNum,
setDragState, setDragState,
clonePointData,
]); ]);
return <>{render}</>; return <>{render}</>;

View File

@ -142,7 +142,7 @@
border: 2px solid #06c; border: 2px solid #06c;
.tooltip { .tooltip {
position: relative; position: relative;
z-index: 999999; // z-index: 999999;
width: 388px; width: 388px;
text-align: right; text-align: right;
} }