样式(打开F12点一点就知道改哪里了)
<style scoped lang="scss" >
/deep/ .el-switch__label {
position: absolute;
display: none;
color: #fff;
}
/deep/ .el-switch__label--left {
z-index: 9;
left: 25px;
}
/deep/ .el-switch__label--right {
z-index: 9;
left: -2px;
}
/deep/ .el-switch__label.is-active {
display: block;
}
/deep/ .el-switch.is-checked .el-switch__core::after {
left: 94%;
}
/deep/ .el-switch .el-switch__core,.el-switch .el-switch__label {
width: 48px !important;
height: 22px !important;
}
/deep/ .el-switch__core{
// border-radius:15px;
&:after{
width:20px;
height:20px;
top:0px;
// left:3px;
// z-index:10;
}
}
}