From 512a2ab86e22fc2fb46e005db6039f2551ae0e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 30 Jun 2026 11:35:19 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=96=B0=E5=A2=9E=20=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=85=A8=E9=AB=98=E8=A1=A8=E6=A0=BC=E5=86=85?= =?UTF-8?q?=E9=83=A8=E6=95=B0=E6=8D=AE=E6=BB=9A=E5=8A=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/index-tree.tsx.ftl | 4 +- gen/index.tsx.ftl | 4 +- src/assets/styles/components/table-tools.less | 49 +++++++++++++++++++ src/components/layout/LayoutSettings.tsx | 3 ++ src/layouts/BasicLayout.tsx | 3 +- src/pages/demo/demo/index.tsx | 4 +- src/pages/demo/tree/index.tsx | 4 +- src/pages/monitor/logininfo/index.tsx | 4 +- src/pages/monitor/online/index.tsx | 4 +- src/pages/monitor/operlog/index.tsx | 4 +- src/pages/system/client/index.tsx | 4 +- src/pages/system/config/index.tsx | 4 +- src/pages/system/dept/index.tsx | 4 +- src/pages/system/dict/index.tsx | 11 +++-- src/pages/system/menu/index.tsx | 4 +- src/pages/system/notice/index.tsx | 4 +- src/pages/system/oss/config.tsx | 4 +- src/pages/system/oss/index.tsx | 4 +- src/pages/system/post/index.tsx | 4 +- src/pages/system/role/authUser.tsx | 4 +- src/pages/system/role/index.tsx | 4 +- src/pages/system/user/authRole.tsx | 4 +- src/pages/system/user/index.tsx | 4 +- src/pages/tool/gen/index.tsx | 4 +- src/pages/workflow/category/index.tsx | 4 +- src/pages/workflow/leave/index.tsx | 4 +- .../workflow/processDefinition/index.tsx | 4 +- src/pages/workflow/processInstance/index.tsx | 4 +- src/pages/workflow/spel/index.tsx | 4 +- src/pages/workflow/task/allTaskWaiting.tsx | 4 +- src/pages/workflow/task/myDocument.tsx | 4 +- src/pages/workflow/task/taskList.tsx | 4 +- src/stores/appStore.ts | 4 +- 33 files changed, 148 insertions(+), 34 deletions(-) diff --git a/gen/index-tree.tsx.ftl b/gen/index-tree.tsx.ftl index 9284902c..6c8eb411 100644 --- a/gen/index-tree.tsx.ftl +++ b/gen/index-tree.tsx.ftl @@ -62,6 +62,7 @@ import { useDict } from '@/hooks/useDict'; <#if enableExport> import { useTableExport } from '@/hooks/useTableExport'; +import { useTableScroll } from '@/hooks/useTableScroll'; import { useTreeTableExpand } from '@/hooks/useTreeTableExpand'; import { useUserStore } from '@/stores/userStore'; <#if needDict> @@ -103,6 +104,7 @@ const ${statusField}InactiveValue = <#if statusColumn.javaType == "Boolean">fals export default function ${BusinessName}Page() { const actionRef = useRef(undefined); + const { tableScroll } = useTableScroll(1000); const [form] = Form.useForm<${BusinessName}Form>(); const userInfo = useUserStore(state => state.userInfo); <#if needDict> @@ -308,7 +310,7 @@ export default function ${BusinessName}Page() { actionRef={actionRef} rowKey="${treeCode}" columns={columns} - scroll={{ x: 1000 }} + scroll={tableScroll} pagination={false} search={{ labelWidth: 90 }} expandable={{ diff --git a/gen/index.tsx.ftl b/gen/index.tsx.ftl index e5ca8dec..b6444d22 100644 --- a/gen/index.tsx.ftl +++ b/gen/index.tsx.ftl @@ -64,6 +64,7 @@ import { useDateRangeQuery } from '@/hooks/useDateRangeQuery'; <#if enableExport> import { useTableExport } from '@/hooks/useTableExport'; +import { useTableScroll } from '@/hooks/useTableScroll'; import { useTableSelection } from '@/hooks/useTableSelection'; import { useUserStore } from '@/stores/userStore'; <#if needDict> @@ -90,6 +91,7 @@ const ${statusField}InactiveValue = <#if statusColumn.javaType == "Boolean">fals export default function ${BusinessName}Page() { const actionRef = useRef(undefined); + const { tableScroll } = useTableScroll(1000); const [form] = Form.useForm<${BusinessName}Form>(); const userInfo = useUserStore(state => state.userInfo); <#if needDict> @@ -292,7 +294,7 @@ const { applyDateRange: apply${column.capJavaField}DateRange } = useDateRangeQue actionRef={actionRef} rowKey="${pkColumn.javaField}" columns={columns} - scroll={{ x: 1000 }} + scroll={tableScroll} search={{ labelWidth: 90 }} pagination={{ defaultPageSize: 10, showSizeChanger: true }} rowSelection={{ selectedRowKeys: ids, onChange: handleSelectionChange }} diff --git a/src/assets/styles/components/table-tools.less b/src/assets/styles/components/table-tools.less index 869aff42..7e1add8b 100644 --- a/src/assets/styles/components/table-tools.less +++ b/src/assets/styles/components/table-tools.less @@ -83,6 +83,55 @@ overflow: auto; } +.ant-pro-layout .ant-table-body, +.ant-pro-layout .ant-table-content, +.ant-pro-layout .ant-table-sticky-scroll { + scrollbar-color: rgba(148, 163, 184, 0.42) transparent; + scrollbar-width: thin; +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar, +.ant-pro-layout .ant-table-content::-webkit-scrollbar, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar-button, +.ant-pro-layout .ant-table-content::-webkit-scrollbar-button, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar-button { + display: none; + width: 0; + height: 0; +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar-track, +.ant-pro-layout .ant-table-content::-webkit-scrollbar-track, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar-track { + background: transparent; +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar-thumb, +.ant-pro-layout .ant-table-content::-webkit-scrollbar-thumb, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar-thumb { + background-color: rgba(148, 163, 184, 0.38); + background-clip: padding-box; + border: 2px solid transparent; + border-radius: 999px; +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar-thumb:hover, +.ant-pro-layout .ant-table-content::-webkit-scrollbar-thumb:hover, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar-thumb:hover { + background-color: rgba(100, 116, 139, 0.56); +} + +.ant-pro-layout .ant-table-body::-webkit-scrollbar-corner, +.ant-pro-layout .ant-table-content::-webkit-scrollbar-corner, +.ant-pro-layout .ant-table-sticky-scroll::-webkit-scrollbar-corner { + background: transparent; +} + .icon-select-popover-react { width: min(450px, calc(100vw - 48px)); } diff --git a/src/components/layout/LayoutSettings.tsx b/src/components/layout/LayoutSettings.tsx index c6f4db7a..00139ded 100644 --- a/src/components/layout/LayoutSettings.tsx +++ b/src/components/layout/LayoutSettings.tsx @@ -133,6 +133,9 @@ export default function LayoutSettings({ open, value, onChange, onOpenChange }: patchValue({ dynamicTitle })} /> + + patchValue({ fullHeightTable })} /> +