Style penetration and the style of components in uni_modules under uniapp

1. Cause

1. After using  s coped  , the style of the parent component will not penetrate into the child component

2. scoped function: avoid style pollution

2. Solution: style penetration (modify the default style of subcomponents)

1. ::v-deep (must be a double colon) [It is recommended to use this solution: /deep/ will report an error at some point, ::v-deep is more secure and compiles faster ]

2、/deep/

Three, writing

1、view3

::v-deep(.el-icon){ height: inherit; }

/deep/ .el-icon{ height: inherit; }

2、sleep app

::v-deep .uni-input-input {}

Guess you like

Origin blog.csdn.net/qq_39029949/article/details/130628027