当前位置:网站首页>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
边栏推荐
- As soon as I write the code, President Wang talks with me about the pattern all day
- Pyqt pyside custom telescopic menu bar sharing (including tutorial)
- Laravel8 export excel file
- Web components series (VII) -- life cycle of custom components
- error Couldn‘t find a package. JSON file in "your path“
- UI automation test farewell to manual download of browser driver
- Clickhouse物化视图
- Get to know MySQL connection query for the first time
- Containerization Foundation
- BDF application - topology sequence
猜你喜欢
Special Edition: spreadjs v15.1 vs spreadjs v15.0
[wp]bmzclub几道题的writeup
Pyqt pyside custom telescopic menu bar sharing (including tutorial)
面试汇总:这是一份全面&详细的Android面试指南
Clickhouse同步mysql(基于物化引擎)
JWT漏洞复现
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
This article takes you to understand the relationship between the past and present of Bi and the digital transformation of enterprises
深度学习——LSTM基础
【软件逆向-分析工具】反汇编和反编译工具
随机推荐
Nmap使用手册学习记录
How does the applet solve the rendering layer network layer error?
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
Get to know MySQL connection query for the first time
BDF application - topology sequence
Multimedia query
Some enterprise interview questions of unity interview
[PHP features - variable coverage] improper use, improper configuration and code logic vulnerability of the function
[array]566 Reshape the matrix - simple
The order of LDS links
An elegant program for Euclid‘s algorithm
As soon as I write the code, President Wang talks with me about the pattern all day
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
面试汇总:这是一份全面&详细的Android面试指南
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
speed or tempo in classical music
【看完就懂系列】一文6000字教你从0到1实现接口自动化
Use Firefox browser to quickly pick up Web image materials
[数组]566. 重塑矩阵-简单
Official announcement! The third cloud native programming challenge is officially launched!