🆕 优化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 { useDrag } from 'react-dnd';
import dooringCompt from 'dooringUI/components'; import dooringCompt from 'dooringUI/components';
import styles from './index.less'; import styles from './index.less';
@ -8,7 +8,8 @@ interface TargetBoxProps {
children: ReactNode; children: ReactNode;
canvasId: string; canvasId: string;
} }
const {schemaH5}=dooringCompt const { schemaH5 } = dooringCompt
const SourceBox = memo((props: TargetBoxProps) => { const SourceBox = memo((props: TargetBoxProps) => {
const { item } = props; const { item } = props;
const [{ isDragging }, drag] = useDrag({ const [{ isDragging }, drag] = useDrag({
@ -33,37 +34,33 @@ const SourceBox = memo((props: TargetBoxProps) => {
}), }),
[isDragging], [isDragging],
); );
return ( return <div className={styles.listWrap}>
<> <div className={styles.module} style={{ ...containerStyle }} ref={drag}>
<div className={styles.listWrap}> <div
<div className={styles.module} style={{ ...containerStyle }} ref={drag}> style={{
<div height: '110px',
style={{ display: 'flex',
height: '110px', justifyContent: 'center',
display: 'flex', alignItems: 'center',
justifyContent: 'center', flexDirection: 'column',
alignItems: 'center', overflow: 'hidden',
flexDirection: 'column', }}
overflow: 'hidden', >
}} {props.children}
> </div>
{props.children} <div
</div> style={{
<div height: '30px',
style={{ lineHeight: '30px',
height: '30px', textAlign: 'center',
lineHeight: '30px', backgroundColor: 'rgba(245, 245, 245, 1)',
textAlign: 'center', color: 'rgba(118, 118, 118, 1)',
backgroundColor: 'rgba(245, 245, 245, 1)', }}
color: 'rgba(118, 118, 118, 1)', >
}} {props.item.displayName}
> </div>
{props.item.displayName}
</div> </div>
</div> </div>
</div>
</>
);
}); });
export default SourceBox; 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