具体Css样式如下所示 PS:请根据需要自行保留或去掉 :deep()
:deep(.el-switch__inner) {
left: 18px;
span {
width: 35px;
&:first-child {
text-align: right;
}
&:last-child {
text-align: left;
}
}
}
:deep(.el-switch.is-checked .el-switch__action){
left: 96%;
}