Commit 891e5d3e authored by zhangwenshuai's avatar zhangwenshuai

修改分组时编辑样式

parent 52eb141b
......@@ -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;
......
......@@ -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}
>
<div className={s.content}>
{empty ? (
......@@ -313,13 +310,13 @@ const Cell = (props: CellProps) => {
trigger="contextMenu"
placement="rightTop"
content={
<div role="presentation" className={style.menuContainer}>
<div role="presentation" className={s.menuContainer}>
{contentMenu.map((item: any, i: number) => {
return (
<div
key={i}
role="presentation"
className={style.menu}
className={s.menu}
onClick={item.onClick.bind(null, record)}
>
{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 (
<div className={s.editCell}>
<div className={s.editCell} style={{ width }}>
<EditComp
value={getFormat(editConfig, columnConfig, cellData)}
{...newProps}
......@@ -385,7 +386,7 @@ const Cell = (props: CellProps) => {
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 (
<div
className={classNames(
......@@ -408,8 +411,7 @@ const Cell = (props: CellProps) => {
)}
style={{
...cellStyle,
paddingLeft:
columnIndex === 0 && position !== 'right' && record.groupLevel ? `${record.groupLevel * 16}px` : 0,
paddingLeft,
paddingTop: `${groupLevel * 40}px`,
}}
onMouseEnter={onMouseEnter}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment