From d8452e98f5775cbfdbb636e6696f003f541f0b1c Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 9 Dec 2025 15:41:51 +0800 Subject: [PATCH] style: drawer styles --- src/components/icon-font/index.tsx | 2 +- src/components/scroller-modal/gs-drawer.tsx | 27 ++++++++++++++++++- src/config/theme/dark.ts | 3 ++- src/config/theme/light.ts | 3 ++- src/hooks/use-overlay-scroller.ts | 4 ++- .../components/add-apikey-modal/index.tsx | 10 ------- .../components/deploy-builtin-modal.tsx | 10 ------- .../llmodels/components/deploy-modal.tsx | 10 ------- .../llmodels/components/update-modal.tsx | 10 ------- src/pages/llmodels/download/index.tsx | 10 ------- 10 files changed, 34 insertions(+), 55 deletions(-) diff --git a/src/components/icon-font/index.tsx b/src/components/icon-font/index.tsx index dadcd310..8a364c7f 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_5idsv7urmzf.js' + scriptUrl: '//at.alicdn.com/t/c/font_4613488_xvmo08q7urm.js' }); export default IconFont; diff --git a/src/components/scroller-modal/gs-drawer.tsx b/src/components/scroller-modal/gs-drawer.tsx index 001f9074..0ccac71a 100644 --- a/src/components/scroller-modal/gs-drawer.tsx +++ b/src/components/scroller-modal/gs-drawer.tsx @@ -2,8 +2,20 @@ import { useEscHint } from '@/hooks/use-esc-hint'; import { CloseOutlined } from '@ant-design/icons'; import { Button, Drawer, type DrawerProps } from 'antd'; +/** + * use ColumnWrapper to wrap content in Drawer with scroller + * 57px is the height of header + * @param props + * @returns + */ const ScrollerModal = (props: DrawerProps) => { - const { title, closable = true, maskClosable = false, ...restProps } = props; + const { + title, + closable = true, + maskClosable = false, + styles, + ...restProps + } = props; const { EscHint } = useEscHint({ enabled: !props.keyboard && props.open }); @@ -14,6 +26,19 @@ const ScrollerModal = (props: DrawerProps) => { <> = ({ closeIcon={false} maskClosable={false} keyboard={false} - styles={{ - body: { - height: 'calc(100vh - 57px)', - padding: '16px 0', - overflowX: 'hidden' - }, - content: { - borderRadius: '6px 0 0 6px' - } - }} width={600} footer={false} > diff --git a/src/pages/llmodels/components/deploy-builtin-modal.tsx b/src/pages/llmodels/components/deploy-builtin-modal.tsx index fb491201..84c5b86e 100644 --- a/src/pages/llmodels/components/deploy-builtin-modal.tsx +++ b/src/pages/llmodels/components/deploy-builtin-modal.tsx @@ -330,16 +330,6 @@ const AddModal: React.FC = (props) => { closeIcon={false} maskClosable={false} keyboard={false} - styles={{ - body: { - height: 'calc(100vh - 57px)', - padding: '16px 0', - overflowX: 'hidden' - }, - content: { - borderRadius: '6px 0 0 6px' - } - }} width={width} footer={false} > diff --git a/src/pages/llmodels/components/deploy-modal.tsx b/src/pages/llmodels/components/deploy-modal.tsx index 20b8e1d9..e2ad6e8f 100644 --- a/src/pages/llmodels/components/deploy-modal.tsx +++ b/src/pages/llmodels/components/deploy-modal.tsx @@ -536,16 +536,6 @@ const AddModal: FC = (props) => { closeIcon={false} maskClosable={false} keyboard={false} - styles={{ - body: { - height: 'calc(100vh - 57px)', - padding: '16px 0', - overflowX: 'hidden' - }, - content: { - borderRadius: '6px 0 0 6px' - } - }} width={width} footer={false} > diff --git a/src/pages/llmodels/components/update-modal.tsx b/src/pages/llmodels/components/update-modal.tsx index 93d78f79..dd4f4b41 100644 --- a/src/pages/llmodels/components/update-modal.tsx +++ b/src/pages/llmodels/components/update-modal.tsx @@ -244,16 +244,6 @@ const UpdateModal: React.FC = (props) => { maskClosable={false} keyboard={false} width={600} - styles={{ - body: { - height: 'calc(100vh - 57px)', - padding: '16px 0', - overflowX: 'hidden' - }, - content: { - borderRadius: '6px 0 0 6px' - } - }} footer={false} > = (props) => { maskClosable={false} keyboard={false} zIndex={2000} - styles={{ - body: { - height: 'calc(100vh - 57px)', - padding: '16px 0', - overflowX: 'hidden' - }, - content: { - borderRadius: '6px 0 0 6px' - } - }} width={width} footer={false} >