当前位置:网站首页>Uni app change the default component style
Uni app change the default component style
2022-07-05 03:59:00 【Summer is already slightly cool】
One 、 explain
vue After component compilation , Will template For each element in the
[data-v-xxxx]
Attribute to ensure thatstyle scoped
Only the elements of this component will not pollute the globalArrange horizontally without wrapping , as follows
Add style
flex-wrap: wrap;
, Line wrap successful
Two 、 solve
1、 stay class front Join in deep
- If you expect to pass such as modifying its son class The style of . To affect the display effect , Directly increase class There is no effect
- You need to modify the specified component style class front Join in deep Can only be
<style lang="scss" scoped> /deep/ .u-checkbox-group--row{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
</style>
2、 stay vue-cli3 Compile time , use ::v-deep
- stay vue-cli3 Compile time ,deep An error will be reported or a warning will be given , We use it
::v-deep
<style lang="scss" scoped> ::v-deep .u-checkbox-group--row{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
</style>
3、 Before editing , Edit well Screenshot comparison
- Before editing
- After editing
3、 ... and 、 His shan zhishi
边栏推荐
- 我就一写代码的,王总整天和我谈格局...
- [array]566 Reshape the matrix - simple
- Online sql to excel (xls/xlsx) tool
- 【做题打卡】集成每日5题分享(第三期)
- [PHP features - variable coverage] improper use, improper configuration and code logic vulnerability of the function
- 【看完就懂系列】一文6000字教你从0到1实现接口自动化
- [charging station]_ Secular wisdom_ Philosophical wisdom _
- Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
- [C language] address book - dynamic and static implementation
- @The problem of cross database query invalidation caused by transactional annotation
猜你喜欢
ABP vNext microservice architecture detailed tutorial - distributed permission framework (Part 2)
EasyCVR更改录像存储路径,不生成录像文件如何解决?
Redis6-01nosql database
[wp][introduction] brush weak type questions
@The problem of cross database query invalidation caused by transactional annotation
灵魂三问:什么是接口测试,接口测试怎么玩,接口自动化测试怎么玩?
Online text line fixed length fill tool
[an Xun cup 2019] not file upload
MindFusion. Virtual Keyboard for WPF
Redis source code analysis: redis cluster
随机推荐
How does the applet solve the rendering layer network layer error?
Deep learning - LSTM Foundation
An elegant program for Euclid‘s algorithm
[PHP features - variable coverage] improper use, improper configuration and code logic vulnerability of the function
UI自动化测试从此告别手动下载浏览器驱动
[wp]bmzclub几道题的writeup
Uni app common functions /api
Rust区块琏开发——签名加密与私钥公钥
花了2晚,拿到了吴恩达@斯坦福大学的机器学习课程证书
MindFusion.Virtual Keyboard for WPF
How to define a unified response object gracefully
【软件逆向-分析工具】反汇编和反编译工具
Analysis of dagger2 principle
陇原战“疫“2021网络安全大赛 Web EasyJaba
Use object composition in preference to class inheritance
Nmap使用手册学习记录
【无标题】
Redis之Jedis如何使用
Yuancosmic ecological panorama [2022 latest]
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery