feature/核算表格双击编辑
lys 5 months ago
parent cf72041cea
commit 30501b5fe7

@ -105,7 +105,7 @@ const index: FunctionComponent<Props> = (props) => {
i18n: item.i18n, i18n: item.i18n,
onCell: (record: any) => ({ onCell: (record: any) => ({
onContextMenu: (e: any) => { onContextMenu: (e: any) => {
record.lockItems && e.preventDefault(); !item.calcDetail && e.preventDefault();
} }
}), }),
render: (text: string, record: any) => { render: (text: string, record: any) => {
@ -134,7 +134,7 @@ const index: FunctionComponent<Props> = (props) => {
} }
]; ];
return ( return (
<Dropdown menu={{ items: !record.calcDetail ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide> <Dropdown menu={{ items: !item.calcDetail ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide>
<span className={styles.contentSpan}> <span className={styles.contentSpan}>
<span title={text} className={styles.contentTitle} style={{ color: `${record?.[item.dataIndex + "_color"]}` }}> <span title={text} className={styles.contentTitle} style={{ color: `${record?.[item.dataIndex + "_color"]}` }}>
{text} {text}

Loading…
Cancel
Save