switch 增加参数 openActiveIcon、closeActiveIcon

This commit is contained in:
xuliangzhan
2024-05-16 18:17:43 +08:00
parent da94122d07
commit e14c8e7ea2
3 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "3.8.7-beta.1",
"version": "3.8.7-beta.2",
"description": "一个基于 vue 的 PC 端表单/表格组件支持增删改查、虚拟树、列拖拽懒加载、快捷菜单、数据校验、树形结构、打印导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",

View File

@@ -16,7 +16,9 @@ export default {
openValue: { type: [String, Number, Boolean], default: true },
closeValue: { type: [String, Number, Boolean], default: false },
openIcon: String,
closeIcon: String
closeIcon: String,
openActiveIcon: String,
closeActiveIcon: String
},
inject: {
$xeform: {

View File

@@ -23,6 +23,7 @@
.vxe-switch--icon {
left: 100%;
transform: translateX(-1.4em);
color: $vxe-primary-color;
}
}
&.is--off {
@@ -33,6 +34,7 @@
.vxe-switch--icon {
left: 0.2em;
transform: translateX(0);
color: $vxe-switch-close-background-color;
}
}
&.is--on .vxe-switch--label-off,
@@ -63,11 +65,17 @@
.vxe-switch--button {
background-color: $vxe-primary-lighten-color;
}
.vxe-switch--icon {
color: $vxe-primary-lighten-color;
}
}
&.is--off {
.vxe-switch--button {
background-color: $vxe-switch-disabled-background-color;
}
.vxe-switch--icon {
color: $vxe-switch-disabled-background-color;
}
}
}
.vxe-switch--button {
@@ -93,6 +101,8 @@
left: 0;
width: 1.2em;
height: 1.2em;
line-height: 1.4em;
text-align: center;
border-radius: 50%;
background-color: $vxe-switch-icon-background-color;
}