style: drawer styles

This commit is contained in:
jialin
2025-12-10 15:50:53 +08:00
parent dda2213593
commit d8452e98f5
10 changed files with 34 additions and 55 deletions
+1 -1
View File
@@ -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;
+26 -1
View File
@@ -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) => {
<>
<Drawer
{...restProps}
styles={{
body: {
height: 'calc(100vh - 57px)',
paddingBlock: 16,
paddingInline: 0,
overflowX: 'hidden',
...styles?.body
},
content: {
borderRadius: '6px 0 0 6px',
...styles?.content
}
}}
closable={false}
maskClosable={maskClosable}
title={