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

unocss 在微信小程序中把icon图片全变成灰色 #26

Closed
gao-xiang opened this issue May 4, 2024 · 7 comments
Closed

unocss 在微信小程序中把icon图片全变成灰色 #26

gao-xiang opened this issue May 4, 2024 · 7 comments

Comments

@gao-xiang
Copy link

unocss-preset-weapp 改为这个合适

@Ares-Chang
Copy link
Owner

请提供错误信息和最小重现 Demo ,并没有理解你遇到的问题

@gao-xiang
Copy link
Author

编辑到小程序后,所有UI中的icon小图标的颜色全部变成灰色

@Ares-Chang
Copy link
Owner

「请提供最小重现」,我无法复现你的问题

@gao-xiang
Copy link
Author

gao-xiang commented May 5, 2024

222222222

左边是H5中,图标是正常,
右上是小程序中,图标是灰色,大小无变化。
右下是代码,使用uniapp ui 和Wot Design Uni 的图标,在小程序中大小和颜色等不生效。

@gao-xiang
Copy link
Author

11111111

这是替换unocss-preset-weapp后,在小程度中就可以正常显示了,

@Ares-Chang
Copy link
Owner

「请提供最小重现」, Thanks!

@Ares-Chang
Copy link
Owner

image

简单理解,unocss attributify 与 组件库 样式冲突,可以选择关闭 attributify 或者添加 attributify 前缀如 my-color-red,

或者简单点,不使用这个组件,unocss 与 iconfiy 搭配起来是非常上瘾的一种行为。非常推荐!

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

2 participants