1+ import React , { useState } from 'react' ;
12import { LangType , ThemeType } from '@/constants' ;
23import i18n , { currentLang } from '@/i18n' ;
3- import React , { useState } from 'react' ;
44import classnames from 'classnames' ;
55import themeDarkImg from '@/assets/img/theme-dark.png' ;
66import themeLightImg from '@/assets/img/theme-light.png' ;
@@ -87,7 +87,6 @@ const colorList = [
8787
8888// baseBody 基础设置
8989export default function BaseSetting ( ) {
90- const [ lang , setLang ] = useState ( currentLang ) ;
9190 const [ appTheme , setAppTheme ] = useTheme ( ) ;
9291 const [ currentTheme , setCurrentTheme ] = useState < ThemeType > ( appTheme . backgroundColor ) ;
9392 const [ currentPrimaryColor , setCurrentPrimaryColor ] = useState ( localStorage . getItem ( 'primary-color' ) ) ;
@@ -111,7 +110,6 @@ export default function BaseSetting() {
111110 location . reload ( ) ;
112111 }
113112
114- // TODO: 这里写 ThemeType 为什么报错呢
115113 function handleChangeTheme ( backgroundColor : any ) {
116114 setAppTheme ( {
117115 ...appTheme ,
@@ -120,6 +118,11 @@ export default function BaseSetting() {
120118 setCurrentTheme ( backgroundColor ) ;
121119 }
122120
121+
122+ const changeSqlEditorFontSize = ( e : any ) => {
123+
124+ }
125+
123126 return (
124127 < >
125128 < div className = { styles . title } > { i18n ( 'setting.title.backgroundColor' ) } </ div >
@@ -139,7 +142,7 @@ export default function BaseSetting() {
139142 </ ul >
140143 < div className = { styles . title } > { i18n ( 'setting.title.language' ) } </ div >
141144 < div className = { styles . langBox } >
142- < Radio . Group onChange = { changeLang } value = { lang } >
145+ < Radio . Group onChange = { changeLang } value = { currentLang } >
143146 < Radio value = { LangType . ZH_CN } > 简体中文</ Radio >
144147 < Radio value = { LangType . EN_US } > English</ Radio >
145148 </ Radio . Group >
@@ -172,6 +175,15 @@ export default function BaseSetting() {
172175 </div>
173176 </ColorPicker> */ }
174177 </ ul >
178+ { /* <div className={styles.title}>{i18n('setting.title.sqlEditorFontSize')}</div>
179+ <div className={styles.sqlEditorFontSize}>
180+ <Radio.Group onChange={changeSqlEditorFontSize}>
181+ <Radio value={12}>12</Radio>
182+ <Radio value={14}>14</Radio>
183+ <Radio value={16}>16</Radio>
184+ </Radio.Group>
185+ </div> */ }
186+
175187 </ >
176188 ) ;
177189}
0 commit comments