jd-opensource / drip-form

基于React和JSONSchema的动态表单解决方案
https://jd-opensource.github.io/drip-form/
MIT License
613 stars 73 forks source link

使用的antd 配置了主题色,按照了@jdfed/form-generator 会把原本项目的主题色会覆盖。 #264

Open hqylss111 opened 1 year ago

hqylss111 commented 1 year ago

Have you read the Contributing Guidelines on issues?

Description

使用的antd 配置了主题色,按照了@jdfed/form-generator 会把原本项目的主题色会覆盖。 使用的create-app cli 然后webpack里面配置了antd 主题。 安装了@jdfed/form-generator 后,会把项目原来的主题色替换,应该怎么去解决这个问题。

Self-service

mengshang918 commented 1 year ago

可以提供一个最小的demo嘛,方便排查。

hqylss111 commented 1 year ago

@jdfed/form-generator
你的源码里面默认会引用antd/dist/index.css 如果项目里面配置了主题色,由于组件是引用进去了 会比项目里面的antd css 层级靠后,就会被覆盖原本项目里面的css。

hqylss111 commented 1 year ago

可能你怕用户不引用antd css吧,怕你的交互会存在问题。

mengshang918 commented 1 year ago

嗯嗯,有时间我复现一下,如果方便可以提供复现demo。

hqylss111 commented 1 year ago

好的 周末我提供一下demo。

hqylss111 commented 1 year ago

588808f6-41ce-4ec4-a790-fb495786c3a9 你有计划兼容这个 应该就是这个问题。

github-actions[bot] commented 1 year ago

This issue has been automatically marked as no-issue-activity because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.