mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-11 01:12:49 +00:00
🆕 优化ts类型,删除无用引用
This commit is contained in:
parent
8989fb6086
commit
b47cdb4644
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, memo, ReactNode, useContext, CSSProperties } from 'react';
|
||||
import { useMemo, memo, ReactNode, CSSProperties } from 'react';
|
||||
import { useDrag } from 'react-dnd';
|
||||
import dooringCompt from 'dooringUI/components';
|
||||
import styles from './index.less';
|
||||
@ -8,7 +8,8 @@ interface TargetBoxProps {
|
||||
children: ReactNode;
|
||||
canvasId: string;
|
||||
}
|
||||
const {schemaH5}=dooringCompt
|
||||
const { schemaH5 } = dooringCompt
|
||||
|
||||
const SourceBox = memo((props: TargetBoxProps) => {
|
||||
const { item } = props;
|
||||
const [{ isDragging }, drag] = useDrag({
|
||||
@ -33,37 +34,33 @@ const SourceBox = memo((props: TargetBoxProps) => {
|
||||
}),
|
||||
[isDragging],
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<div className={styles.listWrap}>
|
||||
<div className={styles.module} style={{ ...containerStyle }} ref={drag}>
|
||||
<div
|
||||
style={{
|
||||
height: '110px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flexDirection: 'column',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
textAlign: 'center',
|
||||
backgroundColor: 'rgba(245, 245, 245, 1)',
|
||||
color: 'rgba(118, 118, 118, 1)',
|
||||
}}
|
||||
>
|
||||
{props.item.displayName}
|
||||
return <div className={styles.listWrap}>
|
||||
<div className={styles.module} style={{ ...containerStyle }} ref={drag}>
|
||||
<div
|
||||
style={{
|
||||
height: '110px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flexDirection: 'column',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
textAlign: 'center',
|
||||
backgroundColor: 'rgba(245, 245, 245, 1)',
|
||||
color: 'rgba(118, 118, 118, 1)',
|
||||
}}
|
||||
>
|
||||
{props.item.displayName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
||||
export default SourceBox;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
11130
packages/ui/yarn.lock
Normal file
11130
packages/ui/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user