Commit 628c9f12 authored by Sendya's avatar Sendya

fix: theme key

parent 7954c750
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
| Property | Description | Type | Default Value | | Property | Description | Type | Default Value |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| navTheme | Theme | `dark` `light` `realDark` | `light` | | theme | Theme | `dark` `light` `realDark` | `light` |
| layout | Sider Layout | `sidemenu` `topmenu` | `sidemenu` | | layout | Sider Layout | `sidemenu` `topmenu` | `sidemenu` |
| primaryColor | Primary color (*development only) | `#1890ff` | | | primaryColor | Primary color (*development only) | `#1890ff` | |
...@@ -132,6 +132,6 @@ export default { ...@@ -132,6 +132,6 @@ export default {
| Property | Description | Type | Default Value | | Property | Description | Type | Default Value |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| navTheme | 主题 | `dark` `light` `realDark` | `light` | | theme | 主题 | `dark` `light` `realDark` | `light` |
| layout | 布局模式 | `sidemenu` `topmenu` | `sidemenu` | | layout | 布局模式 | `sidemenu` `topmenu` | `sidemenu` |
| primaryColor | 主色调 (*仅开发环境生效) | `#1890ff` | | | primaryColor | 主色调 (*仅开发环境生效) | `#1890ff` | |
...@@ -133,7 +133,7 @@ const genCopySettingJson = (settings) => ...@@ -133,7 +133,7 @@ const genCopySettingJson = (settings) =>
) )
export const settings = { export const settings = {
navTheme: PropTypes.oneOf(['dark', 'light', 'realDark']), theme: PropTypes.oneOf(['dark', 'light', 'realDark']),
primaryColor: PropTypes.string, primaryColor: PropTypes.string,
layout: PropTypes.oneOf(['sidemenu', 'topmenu']), layout: PropTypes.oneOf(['sidemenu', 'topmenu']),
colorWeak: PropTypes.bool, colorWeak: PropTypes.bool,
...@@ -166,7 +166,7 @@ const SettingDrawer = { ...@@ -166,7 +166,7 @@ const SettingDrawer = {
} = this } = this
const { const {
navTheme = 'dark', theme = 'dark',
primaryColor = 'daybreak', primaryColor = 'daybreak',
layout = 'sidemenu', layout = 'sidemenu',
fixedHeader = false, fixedHeader = false,
...@@ -220,7 +220,7 @@ const SettingDrawer = { ...@@ -220,7 +220,7 @@ const SettingDrawer = {
</template> </template>
<div class={`${baseClassName}-content`}> <div class={`${baseClassName}-content`}>
<Body title={i18n('app.setting.pagestyle')}> <Body title={i18n('app.setting.pagestyle')}>
<BlockCheckbox list={themeList.themeList} value={navTheme} onChange={(val) => { <BlockCheckbox list={themeList.themeList} value={theme} onChange={(val) => {
changeSetting('theme', val) changeSetting('theme', val)
}} /> }} />
</Body> </Body>
...@@ -228,7 +228,7 @@ const SettingDrawer = { ...@@ -228,7 +228,7 @@ const SettingDrawer = {
<ThemeColor <ThemeColor
title={i18n('app.setting.themecolor')} title={i18n('app.setting.themecolor')}
value={primaryColor} value={primaryColor}
colors={themeList.colorList[navTheme === 'realDark' ? 'dark' : 'light']} colors={themeList.colorList[theme === 'realDark' ? 'dark' : 'light']}
onChange={(color) => { onChange={(color) => {
changeSetting('primaryColor', color, null) changeSetting('primaryColor', color, null)
}} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment