From a7398d4842d4b449512ef2d393e9e5c618ffd5c3 Mon Sep 17 00:00:00 2001 From: wanlei Date: Thu, 9 Nov 2017 10:19:38 +0800 Subject: [PATCH] fix: [switch] removed --- components/switch/Switch.vue | 87 -------------------- components/switch/index.js | 2 - components/switch/style/index.js | 2 - components/switch/style/index.less | 126 ----------------------------- 4 files changed, 217 deletions(-) delete mode 100644 components/switch/Switch.vue delete mode 100644 components/switch/index.js delete mode 100644 components/switch/style/index.js delete mode 100644 components/switch/style/index.less diff --git a/components/switch/Switch.vue b/components/switch/Switch.vue deleted file mode 100644 index 3f3a22ab5..000000000 --- a/components/switch/Switch.vue +++ /dev/null @@ -1,87 +0,0 @@ - - diff --git a/components/switch/index.js b/components/switch/index.js deleted file mode 100644 index 54acb541f..000000000 --- a/components/switch/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Switch from './Switch.vue' -export default Switch diff --git a/components/switch/style/index.js b/components/switch/style/index.js deleted file mode 100644 index cf31ed80f..000000000 --- a/components/switch/style/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import '../../style/index.less' -import './index.less' diff --git a/components/switch/style/index.less b/components/switch/style/index.less deleted file mode 100644 index 8d3bcc552..000000000 --- a/components/switch/style/index.less +++ /dev/null @@ -1,126 +0,0 @@ -@import "../../style/themes/default"; -@import "../../style/mixins/index"; - -@switch-prefix-cls: ~"@{ant-prefix}-switch"; -@switch-duration: .36s; - -.@{switch-prefix-cls} { - position: relative; - display: inline-block; - box-sizing: border-box; - height: 22px; - min-width: 44px; - line-height: 20px; - vertical-align: middle; - border-radius: 20px; - border: 1px solid transparent; - background-color: @disabled-color; - cursor: pointer; - transition: all @switch-duration; - user-select: none; - - &-inner { - color: #fff; - font-size: @font-size-base; - margin-left: 24px; - margin-right: 6px; - display: block; - } - - &:after { - position: absolute; - width: 18px; - height: 18px; - left: 1px; - top: 1px; - - border-radius: 18px; - background-color: @component-background; - content: " "; - cursor: pointer; - transition: all @switch-duration @ease-in-out-circ; - } - - &:active:after { - width: 24px; - } - - &:focus { - box-shadow: 0 0 0 2px fade(@primary-color, 20%); - outline: 0; - } - - &:focus:hover { - box-shadow: none; - } - - &-small { - height: 14px; - min-width: 28px; - line-height: 12px; - - .@{switch-prefix-cls}-inner { - margin-left: 18px; - margin-right: 3px; - } - - &:after { - width: 12px; - height: 12px; - top: 0; - left: 0.5px; - } - - &:active:after { - width: 16px; - } - } - - &-small&-checked { - &:after { - left: 100%; - margin-left: -12.5px; - } - - .@{switch-prefix-cls}-inner { - margin-left: 3px; - margin-right: 18px; - } - } - - &-small:active&-checked:after { - margin-left: -16.5px; - } - - &-checked { - background-color: @primary-color; - - .@{switch-prefix-cls}-inner { - margin-left: 6px; - margin-right: 24px; - } - - &:after { - left: 100%; - margin-left: -19px; - } - - &:active:after { - margin-left: -25px; - } - } - - &-disabled { - cursor: not-allowed; - background: #f4f4f4; - - &:after { - background: #ccc; - cursor: not-allowed; - } - - .@{switch-prefix-cls}-inner { - color: @disabled-color; - } - } -}