vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
https://antdv.com/
Other
20.09k stars 3.78k forks source link

使用编译后的组件,支持切换主题 #6786

Closed SKT1yang closed 11 months ago

SKT1yang commented 1 year ago

What problem does this feature solve?

使用编译后的组件,比如推到npm的二次开发组件,无法切换主题,希望能够支持。 下面是我复现不支持的测试项目地址:https://github.com/SKT1yang/test

复现步骤:

  1. 进入antv4-issue文件夹,npm install 安装依赖
  2. npm run dev 打开页面 我的config-provider配置的是dark算法的主题,但是组件显示默认主题

What does the proposed API look like?

编译后正常使用,正常切换主题(config-provider组件正常生效)

aibayanyu20 commented 1 year ago

二次封装的组件打包要手动排除ant-design-vue,你的组件库和你的项目中存在两个不同的实例导致的问题,建议参考rollup external

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days