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")} />