Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ant design pro v5如何启用黑暗模式 #8039

Closed
1 task
beviniy opened this issue Feb 4, 2021 · 1 comment
Closed
1 task

ant design pro v5如何启用黑暗模式 #8039

beviniy opened this issue Feb 4, 2021 · 1 comment

Comments

@beviniy
Copy link

beviniy commented Feb 4, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

What is expected?

What is actually happening?

Environment Info
antd 4.12.1
React 17.0.0
System macos
Browser chrome 88.0.4324.96(正式版本) (x86_64)

通过ant.design preview的界面生成黑暗模式的配置后,本地无法启用

import { Settings as LayoutSettings } from '@ant-design/pro-layout';

const Settings: LayoutSettings & {
pwa?: boolean;
logo?: string;
} = {
"navTheme": "realDark",
"primaryColor": "#FA541C",
"layout": "mix",
"contentWidth": "Fluid",
"fixedHeader": true,
"fixSiderbar": true,
"title": "Ant Design Pro",
"pwa": false,
"iconfontUrl": "",
"menu": {
"locale": true
},
"headerHeight": 48,
"splitMenus": true
}

export default Settings;

@afc163 afc163 transferred this issue from ant-design/ant-design Feb 4, 2021
@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Feb 4, 2021

在 theme 中设置 dart:true

或者是使用插件

https://umijs.org/zh-CN/plugins/plugin-antd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants