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

ProLayout的Sider Token没有字体大小设置,使用全局的ConfigProvidert又不生效, 难道没人觉得左侧菜单栏的字体14px太小了吗 #8455

Open
Lukunlin opened this issue May 28, 2024 · 3 comments

Comments

@Lukunlin
Copy link

🧐 ProLayout的Sider Token没有字体大小设置, 使用全局的ConfigProvidert又不生效

💻 示例代码

// app.tsx. 无法生效
ConfigProvider.config({
    theme: {
        token: {
            fontSize: 20,
            fontSizeSM: 24,
            fontSizeLG: 24,
            fontSizeXL: 26
        },
        components: {
            Menu: {
                fontSize: 22,
                groupTitleFontSize: 20,
                groupTitleColor: "blue",
                fontSizeSM: 24,
                fontSizeLG: 24,
                fontSizeXL: 26,
                groupTitleFontSize: 22
            },
        }
    }
})

🚑 其他信息

当前antd pro 的版本为: [antd@5.17.3]

贴图

image
image
image

致谢

首先致谢Antd社区工作组的贡献者们, 再次感谢本次能为我提供帮助的先生们[致敬]

@Lukunlin
Copy link
Author

补上一张无法生效的效果图, 和手动使用ConfigProvider组件包裹的menu效果图,来看生效的和在proLayout中不生效的:
image
image

@Lukunlin
Copy link
Author

再次补充,有小伙伴不惑,问我为什么不放到 proLayout的配置中的RunTimeLayoutConfig内, 其实也放过,

放token和多样化配置也还是实测不生效。下面贴代码, 代码是为了测试乱写的,因为我看了RunTimeLayoutConfig的类型,其实没有这些申明。

image

@Lukunlin
Copy link
Author

目前试了,除了自定义 menuRender 渲染整个menu方法外, 不知道有大佬能给出其他方案吗

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

1 participant