diff --git a/package.json b/package.json index 8b50ef0a2..f983933c5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/switch/src/switch.js b/packages/switch/src/switch.js index 984d685e3..f57db965c 100644 --- a/packages/switch/src/switch.js +++ b/packages/switch/src/switch.js @@ -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: { diff --git a/styles/switch.scss b/styles/switch.scss index 47a8ac9a9..9568a8400 100644 --- a/styles/switch.scss +++ b/styles/switch.scss @@ -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; }