🆕 优化ts类型,删除无用引用

This commit is contained in:
xujiang 2021-09-30 23:06:59 +08:00
parent 8989fb6086
commit b47cdb4644
4 changed files with 16052 additions and 1742 deletions

View File

@ -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

File diff suppressed because it is too large Load Diff

4483
yarn.lock Normal file

File diff suppressed because it is too large Load Diff