-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
预设与 tailwindcss 冲突,没有设置途径 #6407
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
Comments
@jiangmaniu 我感觉可以,将useStyleProvider引入,如果可以,我会去提一个pr import { useStyleProvider } from 'ant-design-vue/es/_util/cssinjs';
useStyleProvider({
hashPriority:"high",
}); |
@CCherry07 包一个 StyleProvider 组件出来吧,用use 的有点问题(调用use的那个组件不会生效) |
我在rc6中运行正常,并提供了其他的api |
它在控制台报了一个错误 |
应该将StyleProvider用法, 添加到ant design vue的官方文档中 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
4.0.0-alpha.3
Environment
根据 antd issues 可知 由于权重问题,导致样式会被 tailwindcss 预设给覆盖,根据官网可知,通过将
StyleProvider
组件的 hashPriority 属性设置为 "high",即可解决该问题,但我再使用时发现该组件库没有导出StyleProvider
组件,看了源码后发现是通过inject/provide
实现的,并且hashPriority
属性是写死的,无法通过业务层设置。ant-design-vue/components/_util/cssinjs/StyleContext.tsx
Line 79 in ae27d43
如果
Reproduction link
http://baidu.com
希望能与antd一样导出一个
StyleProvider
组件供用户设置,也可以将设置参数集成到ConfigProvider
组件中,或者以其他方式进行设置。The text was updated successfully, but these errors were encountered: