/* * Author: 黎永顺 * name: 自定义薪资核算表格标题 * Description: * Date: 2023/9/15 */ import React, { FunctionComponent } from "react"; import classnames from "classnames"; import Icon from "@/lib/CustomIcon"; import styles from "@/pages/atdTable/components/index.less"; interface OwnProps { dataIndex?: string; title?: string; lockStatus?: string; onHandleFormulatd?: any; i18n?: any; } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {} } = props; const handleToggleSalaryItemVal = (salaryItemId: string, type: string) => { window.parent.postMessage( { type: "turn", payload: { id: "LOCKING", params: { lockType: type, salaryItemId } } }, "*" ); }; return ( // th-width-lock
onHandleFormulatd(dataIndex)}>{title}
{ !!lockStatus &&
handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/>
}
); }; export default customTableTitle;