效果如下:
分类
代码如下: 单独选择任意一项属性 checkStrictly , 绑定的是分类 id popper-class自定义类名
<el-cascader
v-model="form.cateIds"
:options="cateList"
popper-class="removeRadio"
:props="{ checkStrictly: true,value:'id' }"
clearable></el-cascader>
修改样式:不能加 scope 也可以放在全局样式上,要修改的样式前面要加上自定义的样式名。
<style>
.removeRadio .el-radio__inner {
border-radius: 0;
border: 0;
width: 170px;
height: 34px;
background-color: transparent;
cursor: pointer;
box-sizing: border-box;
position: absolute;
top: -18px;
left: -19px;
}
.removeRadio .el-radio__input.is-checked .el-radio__inner {
background: transparent;
}
</style>