From f90fda8bfbd8da4b82e3cd72d8c632f0f0929881 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 23 Oct 2024 09:50:34 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/customTableTitle.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index 74f6c8d..1985999 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -17,21 +17,15 @@ interface OwnProps { i18n?: any; pattern?: number; calcDetail?: boolean; //查看详情页面 + children?: any; } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { - const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props; - + const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail, children } = props; const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => { - window.parent.postMessage( - { - type: "turn", - payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } - }, - "*" - ); + window.parent.postMessage({ type: "turn", payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*"); }; return ( // th-width-lock @@ -39,7 +33,7 @@ const customTableTitle: FunctionComponent = (props) => {
onHandleFormulatd(dataIndex)}> {title}
- {!calcDetail && ( + {!calcDetail && _.isEmpty(children) && (
handleToggleSalaryItemVal(dataIndex as string, "LOCK")} /> handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")} />