From 455ae8aa05c03b4e0f8431047390e5eb04b943f4 Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 27 Mar 2025 18:31:03 +0800 Subject: [PATCH] style(font): font size 14 --- src/components/icon-font/index.tsx | 2 +- .../seal-table/components/row-prefix.tsx | 14 +++++++++++--- src/components/status-tag/index.less | 2 +- src/config/theme.ts | 12 +++++++++--- src/global.less | 1 - src/pages/llmodels/components/advance-config.tsx | 11 ++++++----- src/pages/resources/components/workers.tsx | 4 ++-- 7 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/components/icon-font/index.tsx b/src/components/icon-font/index.tsx index fca76380..87543e2c 100644 --- a/src/components/icon-font/index.tsx +++ b/src/components/icon-font/index.tsx @@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons'; // import './iconfont/iconfont.js'; const IconFont = createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/c/font_4613488_ivr9tor4zfm.js' + scriptUrl: '//at.alicdn.com/t/c/font_4613488_f316s64919m.js' }); export default IconFont; diff --git a/src/components/seal-table/components/row-prefix.tsx b/src/components/seal-table/components/row-prefix.tsx index 2372a2fd..ccf8f9c1 100644 --- a/src/components/seal-table/components/row-prefix.tsx +++ b/src/components/seal-table/components/row-prefix.tsx @@ -1,4 +1,4 @@ -import { DownOutlined, RightOutlined } from '@ant-design/icons'; +import IconFont from '@/components/icon-font'; import { Button, Checkbox } from 'antd'; import _ from 'lodash'; import React from 'react'; @@ -28,7 +28,11 @@ const RowPrefix: React.FC = (props) => { {_.isBoolean(expandable) ? ( ) : ( expandable @@ -43,7 +47,11 @@ const RowPrefix: React.FC = (props) => {
{_.isBoolean(expandable) ? ( ) : ( expandable diff --git a/src/components/status-tag/index.less b/src/components/status-tag/index.less index e3cb80dd..3b5a8116 100644 --- a/src/components/status-tag/index.less +++ b/src/components/status-tag/index.less @@ -8,7 +8,7 @@ min-width: 76px; width: max-content; height: 24px; - font-size: var(--font-size-base); + font-size: var(--font-size-small); overflow: hidden; .txt { diff --git a/src/config/theme.ts b/src/config/theme.ts index a4f14a12..77bbc18f 100644 --- a/src/config/theme.ts +++ b/src/config/theme.ts @@ -9,11 +9,15 @@ export default { }, Table: { cellFontSize: 14, - rowSelectedHoverBg: 'rgba(230, 230, 230, 0.88)', - rowSelectedBg: 'rgb(244, 245, 244)' + rowSelectedHoverBg: 'rgb(249 249 249)', + rowHoverBg: 'rgb(249 249 249)', + rowSelectedBg: 'transparent' }, Button: { - contentFontSizeLG: 14 + contentFontSizeLG: 14, + primaryShadow: 'none', + defaultShadow: 'none', + dangerShadow: 'none' }, Tabs: { titleFontSizeLG: 14 @@ -59,6 +63,8 @@ export default { } }, token: { + fontFamily: + "'Segoe UI', Roboto, Helvetica, -apple-system, BlinkMacSystemFont, Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", colorText: 'rgba(0,0,0,1)', colorPrimary: '#007BFF', colorSuccess: '#54cc98', diff --git a/src/global.less b/src/global.less index 45a789e4..e14bade3 100644 --- a/src/global.less +++ b/src/global.less @@ -156,7 +156,6 @@ body * { } body { - font-family: 'noto sans', sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; diff --git a/src/pages/llmodels/components/advance-config.tsx b/src/pages/llmodels/components/advance-config.tsx index 58f0f471..9243a7f0 100644 --- a/src/pages/llmodels/components/advance-config.tsx +++ b/src/pages/llmodels/components/advance-config.tsx @@ -7,7 +7,7 @@ import SealSelect from '@/components/seal-form/seal-select'; import TooltipList from '@/components/tooltip-list'; import { PageActionType } from '@/config/types'; import useAppUtils from '@/hooks/use-app-utils'; -import { QuestionCircleOutlined, RightOutlined } from '@ant-design/icons'; +import { QuestionCircleOutlined } from '@ant-design/icons'; import { useIntl } from '@umijs/max'; import { Checkbox, @@ -478,10 +478,11 @@ const AdvanceConfig: React.FC = (props) => { destroyInactivePanel={false} className={dataformStyles['advanced-collapse']} expandIcon={({ isActive }) => ( - + )} items={collapseItems} > diff --git a/src/pages/resources/components/workers.tsx b/src/pages/resources/components/workers.tsx index 4d43b137..bf3ec28c 100644 --- a/src/pages/resources/components/workers.tsx +++ b/src/pages/resources/components/workers.tsx @@ -27,7 +27,7 @@ import { message } from 'antd'; import _ from 'lodash'; -import { useCallback, useState } from 'react'; +import React, { useCallback, useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { deleteWorker, queryWorkersList, updateWorker } from '../apis'; import { WorkerStatusMapValue, status } from '../config'; @@ -308,7 +308,7 @@ const Workers: React.FC = () => { borderRadius: 12 }} > - {key} + {key} :{value} );