From d99475bb8001217d4764485cdab7e77d0d665987 Mon Sep 17 00:00:00 2001 From: jialin Date: Fri, 13 Mar 2026 16:29:39 +0800 Subject: [PATCH] style: table overflow scroller style --- src/assets/styles/table.less | 12 ++++++++++++ src/pages/benchmark/index.tsx | 21 +-------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/assets/styles/table.less b/src/assets/styles/table.less index ef893de4..d45ac932 100644 --- a/src/assets/styles/table.less +++ b/src/assets/styles/table.less @@ -8,3 +8,15 @@ } } } + +.scroll-table { + .ant-table { + .ant-table-container { + .ant-table-body, + .ant-table-content { + scrollbar-width: thin; + scrollbar-color: var(--color-scrollbar-thumb) transparent; + } + } + } +} diff --git a/src/pages/benchmark/index.tsx b/src/pages/benchmark/index.tsx index 77f33a64..c29ee860 100644 --- a/src/pages/benchmark/index.tsx +++ b/src/pages/benchmark/index.tsx @@ -9,7 +9,6 @@ import { useQueryModelList } from '@/pages/llmodels/services/use-query-model-lis import { useIntl, useNavigate } from '@umijs/max'; import { useMemoizedFn } from 'ahooks'; import { ConfigProvider, Table, message } from 'antd'; -import { createStyles } from 'antd-style'; import _ from 'lodash'; import { useEffect } from 'react'; import NoResult from '../_components/no-result'; @@ -36,23 +35,6 @@ import useQueryDataset from './services/use-query-dataset'; import useQueryProfiles from './services/use-query-profiles'; import useStopBenchmark from './services/use-stop-benchmark'; -const useStyle = createStyles(({ css, token }) => { - const antCls = '.ant'; - return { - customTable: css` - ${antCls}-table { - ${antCls}-table-container { - ${antCls}-table-body, - ${antCls}-table-content { - scrollbar-width: thin; - scrollbar-color: var(--color-scrollbar-thumb) transparent; - } - } - } - ` - }; -}); - const Benchmark: React.FC = () => { const { dataSource, @@ -76,7 +58,6 @@ const Benchmark: React.FC = () => { watch: true, contentForDelete: 'menu.models.benchmark' }); - const { styles } = useStyle(); const intl = useIntl(); const navigate = useNavigate(); const { openBenchmarkModal, closeBenchmarkModal, openBenchmarkModalStatus } = @@ -261,7 +242,7 @@ const Benchmark: React.FC = () => {