@@ -5,18 +5,16 @@ import { Alert, Button, Divider, Drawer, List, message, Switch } from 'antd';
55import React , { useEffect , useState } from 'react' ;
66import useMergedState from 'rc-util/lib/hooks/useMergedState' ;
77import omit from 'omit.js' ;
8- import type { ProSettings } from '@ant-design/pro-layout' ;
8+ import type { ProSettings , Settings as LayoutSettings } from '@ant-design/pro-layout' ;
99import BlockCheckbox from './BlockCheckbox' ;
1010import ThemeColor from './ThemeColor' ;
1111import getLocales , { getLanguage } from './locales' ;
1212import { genStringToTheme } from './utils' ;
1313import LayoutSetting , { renderLayoutSettingItem } from './LayoutChange' ;
14- import RegionalSetting from './RegionalChange' ;
1514import { useModel } from 'umi' ;
1615import ConfigUtils from '@/utils/ConfigUtils' ;
1716import type { BodyProps , MergerSettingsType , SettingDrawerProps } from './typings' ;
1817import { LayoutSetting as LayoutSettingUtils } from '@/utils/Ballcat' ;
19- import type { Settings as LayoutSettings } from '@ant-design/pro-layout' ;
2018
2119export const getFormatMessage = ( ) : ( ( data : { id : string ; defaultMessage ?: string } ) => string ) => {
2220 const formatMessage = ( { id } : { id : string ; defaultMessage ?: string } ) : string => {
@@ -182,6 +180,9 @@ const SettingDrawer: React.FC<SettingDrawerProps> = (props) => {
182180 style = { {
183181 zIndex : 999 ,
184182 } }
183+ bodyStyle = { { paddingBottom : '0' } }
184+ drawerStyle = { { height : '100%' } }
185+ contentWrapperStyle = { { height : 'auto' } }
185186 >
186187 < div className = { `${ baseClassName } -drawer-content` } >
187188 < Body titleKey = "pagestyle" prefixCls = { baseClassName } >
@@ -194,14 +195,17 @@ const SettingDrawer: React.FC<SettingDrawerProps> = (props) => {
194195 onChange = { ( value ) => changeSetting ( 'navTheme' , value ) }
195196 />
196197 </ Body >
197- < Body titleKey = "themecolor" prefixCls = { baseClassName } >
198- < ThemeColor
199- value = { primaryColor ! }
200- colors = { hideColors ? [ ] : colorList }
201- formatMessage = { formatMessage }
202- onChange = { ( color ) => changeSetting ( 'primaryColor' , color ) }
203- />
204- </ Body >
198+
199+ { ! hideColors && (
200+ < Body titleKey = "themecolor" prefixCls = { baseClassName } >
201+ < ThemeColor
202+ value = { primaryColor ! }
203+ colors = { colorList }
204+ formatMessage = { formatMessage }
205+ onChange = { ( color ) => changeSetting ( 'primaryColor' , color ) }
206+ />
207+ </ Body >
208+ ) }
205209
206210 < Divider />
207211
@@ -231,11 +235,11 @@ const SettingDrawer: React.FC<SettingDrawerProps> = (props) => {
231235 < LayoutSetting settings = { layoutSetting } changeSetting = { changeSetting } />
232236 < Divider />
233237
234- < Body titleKey = "regionalsettings" prefixCls = { baseClassName } >
235- < RegionalSetting settings = { layoutSetting } changeSetting = { changeSetting } />
236- </ Body >
238+ { /* <Body titleKey="regionalsettings" prefixCls={baseClassName}>*/ }
239+ { /* <RegionalSetting settings={layoutSetting} changeSetting={changeSetting}/>*/ }
240+ { /* </Body>*/ }
237241
238- < Divider />
242+ { /* <Divider/>*/ }
239243
240244 < Body titleKey = "othersettings" prefixCls = { baseClassName } >
241245 < List
0 commit comments