From 2f50be171ae2b188860cc24c0aedbc0a2dfaf262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 3 Jan 2024 14:31:31 +0800 Subject: [PATCH] master --- src/pages/calcTable/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 5a78abe..4343872 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -20,6 +20,7 @@ interface OwnProps { } type Props = OwnProps; +type fixedProps = boolean | "top" | "bottom"; const { Text } = Typography; const index: FunctionComponent = (props) => { @@ -32,6 +33,7 @@ const index: FunctionComponent = (props) => { const [isDetailTable, setIsDetailTable] = useState(false); const [sumRowlistUrl, setSumRowlistUrl] = useState(""); const [payload, setPayload] = useState(""); + const [fixed, setFixed] = useState(true); useEffect(() => { window.parent.postMessage({ type: "init" }, "*"); @@ -45,13 +47,15 @@ const index: FunctionComponent = (props) => { if (!_.isEmpty(data)) { const { columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, - showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail + showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail, + fixed = true } = data; setSumRowlistUrl(sumRowlistUrl); setShowTotalCell(showTotalCell); setIsDetailTable(calcDetail); setI18n(i18nRes); setPayload(payload); + setFixed(fixed); setPageInfo(pageInfo); setDataSource(dataSource); setSelectedRowKeys(selectedRowKeys); @@ -140,7 +144,7 @@ const index: FunctionComponent = (props) => { }} summary={() => ( !showTotalCell ? <> : - + {i18n["总计"]}