mpvue——修改第三方组件样式
作者:mobiledu2502868523 | 来源:互联网 | 2023-02-10 15:03
前言我们都知道在vue中可以定义多个<style>,一般为了防止全局污染,我们会使用<stylescoped>代表这里面的css样式只在本页面生效。全局
私有
使用/deep/进行穿透,在mpvue中使用>>>穿透,编译会报错
.form-area {
width: 100%;
bottom: 1.88rem;
.form-wrap {
width: 340px;
position: relative;
left: 20px;
.form-item {
width: 100%;
height: 50px;
margin: 5px 0;
border-radius: 10px;
background-color: #fff;
/deep/.van-cell {
width: 240px !important;
position: none !important;
}
}
}