当前位置:网站首页>The component style set by uniapp takes effect in H5 and app, but does not take effect in wechat applet. The problem is solved

The component style set by uniapp takes effect in H5 and app, but does not take effect in wechat applet. The problem is solved

2022-06-12 19:24:00 Xiaolingzi xiaolingzi

problem : Want to modify uview Styles of components in the component library , Want to use the depth selector >>>(/deep/) The way to modify , After modification, it is in H5 and APP Both of them are in effect , But you can't see the set style in the applet .
solve :
1. You need to use the components of custom components first / Add and data Of the same rank options attribute , Set up options:{styleIsolation: ‘shared’}
2. Get rid of style Labeled scoped attribute
3. If it still doesn't work , See if the priority is not high enough , Increase priority by adding a parent selector , Or add... After the style !important( Not recommended , Easy to affect other page styles )
 Insert picture description here

原网站

版权声明
本文为[Xiaolingzi xiaolingzi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202281547356352.html