diff --git a/components/apolloTable/component/Cell.less b/components/apolloTable/component/Cell.less index 24372570ac45c3d27f4360a0dd41211b794ccc6c..7efd0c2da5a7971c1df2318b9a35dd2c7691625a 100644 --- a/components/apolloTable/component/Cell.less +++ b/components/apolloTable/component/Cell.less @@ -125,11 +125,11 @@ } .editCell { position: absolute; - z-index: 1; width: 100%; - height: 100%; - top: 0; - left: 0; + height: 40px; + z-index: 10; + //top: 0; + //left: 0; } .menuPop { width: 110px; diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index 3f6ef7bd63e8076788c036eb5c3e896e8c5819a3..0d4bb9c2d4c3a6ff539f1a4e502ee67361f8bbe7 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -236,8 +236,6 @@ const Cell = (props: CellProps) => { }; const transferColumn = transferAttr(columnType, newProps); - const style: any = {}; - const { dynamicCellConfigDTO } = columnData || {}; // 不可编辑状态(无编辑权限、列只读、行锁定、单元格只读) const disabled = @@ -284,7 +282,6 @@ const Cell = (props: CellProps) => { } } }} - style={style} >
{empty ? ( @@ -313,13 +310,13 @@ const Cell = (props: CellProps) => { trigger="contextMenu" placement="rightTop" content={ -
+
{contentMenu.map((item: any, i: number) => { return (
{item.label} @@ -352,8 +349,12 @@ const Cell = (props: CellProps) => { const newProps = { ...(transferColumn || {}), }; + const width = + columnIndex === 0 && position !== 'right' && record.groupLevel + ? `${cellStyle.width - record.groupLevel * 16 - 50}px` + : cellStyle.width; return ( -
+
{ rowId={record.id} cellRenderProps={cellRenderProps} style={{ - minHeight: cellStyle.height, + minHeight: 40, //cellStyle.height, borderRadius: 0, }} maxPopHeight={maxPopHeight} @@ -396,6 +397,8 @@ const Cell = (props: CellProps) => { ); }; const groupLevel = getGroupLevel(record.classList); + const paddingLeft = + columnIndex === 0 && position !== 'right' && record.groupLevel ? `${record.groupLevel * 16}px` : 0; return (
{ )} style={{ ...cellStyle, - paddingLeft: - columnIndex === 0 && position !== 'right' && record.groupLevel ? `${record.groupLevel * 16}px` : 0, + paddingLeft, paddingTop: `${groupLevel * 40}px`, }} onMouseEnter={onMouseEnter}