import React, { memo } from 'react'; import styles from './index.less'; import { IListConfig } from './schema'; import logo from 'editorAssets/07-列表.png'; import { StateWithHistory } from 'redux-undo'; // import { Dispatch } from 'umi'; import { connect } from 'dva'; const List = memo((props: IListConfig) => { const { round, sourceData, imgSize, fontSize, color } = props; const containerRef = React.useRef(null); React.useEffect(() => { const { clientHeight = 0, parentElement } = containerRef.current || {}; if (clientHeight && parentElement ) { // parentElement.style.height = clientHeight + "px" props.dispatch({ type: 'editorModal/updateH', payload: { h: clientHeight/2, id: parentElement.id // id: uuid(6, 10), // item, // point: { i: `x-${pointData.length}`, x: 0, y: gridY, w, h: item.h, isBounded: true }, // status: 'inToCanvas', }, }); } }, []); return ( <> {props.isTpl && (