We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在app.tsx中设置token,想通过colorMenuBackground token来改变侧边栏的背景色, 但并未生效,仍旧是默认的transparent背景色
export const layout: RunTimeLayoutConfig = (initialState) => { return { logo: logo, title: 'test', menu: { locale: false, }, token: { colorMenuBackground: '#fff' }, layout: 'mix', avatarProps: { size: 'small', title: '七妮妮', render: (props, dom) => { return ( <Dropdown menu={{ items: [ { key: 'logout', label: ( <Button type={'text'} onClick={signOut}> 登出 </Button> ), }, ], }} > {dom} </Dropdown> ); }, }, }; };
版本信息: umi/max 4.0.89 antd 5.4.0 @ant-design/pro-components 2.4.4
OS: win11
Node:18.17.0
浏览器 | browser:
The text was updated successfully, but these errors were encountered:
如果在app.tsx文件中设置token,需要放在...initialState?.settings的后面,否则会被/config/defaultSettings.ts中设置的token属性覆盖,要么就在/config/defaultSettings.ts文件中设置
app.tsx
token
...initialState?.settings
/config/defaultSettings.ts
而且菜单侧边背景色设置完整是:
token: { sider: { colorMenuBackground: '#fff' } }
Sorry, something went wrong.
No branches or pull requests
🧐 问题描述 | Problem description
我在app.tsx中设置token,想通过colorMenuBackground token来改变侧边栏的背景色, 但并未生效,仍旧是默认的transparent背景色
💻 示例代码 | Sample code
export const layout: RunTimeLayoutConfig = (initialState) => { return { logo: logo, title: 'test', menu: { locale: false, }, token: { colorMenuBackground: '#fff' }, layout: 'mix', avatarProps: { size: 'small', title: '七妮妮', render: (props, dom) => { return ( <Dropdown menu={{ items: [ { key: 'logout', label: ( <Button type={'text'} onClick={signOut}> 登出 </Button> ), }, ], }} > {dom} </Dropdown> ); }, }, }; };
🚑 其他信息 | Other information
版本信息:
umi/max 4.0.89
antd 5.4.0
@ant-design/pro-components 2.4.4
OS: win11
Node:18.17.0
浏览器 | browser:
The text was updated successfully, but these errors were encountered: