diff --git a/components/switch/demo/disabled.md b/components/switch/demo/disabled.md index 45cbeb4994..f6c58c73e4 100644 --- a/components/switch/demo/disabled.md +++ b/components/switch/demo/disabled.md @@ -1,8 +1,8 @@ -# 简单 +# 不可用 - order: 1 -最简单的用法。 +Switch 失效状态。 --- @@ -13,7 +13,7 @@ var container = document.getElementById('components-switch-demo-disabled'); var Test = React.createClass({ getInitialState() { return { - disabled: false + disabled: true } }, toggle(){ diff --git a/components/switch/index.md b/components/switch/index.md index 4da2a7a1d8..7d37fa2a3b 100644 --- a/components/switch/index.md +++ b/components/switch/index.md @@ -6,7 +6,7 @@ --- -开关选择器。 +开关选择器 ## 何时使用 diff --git a/style/components/switch.less b/style/components/switch.less index da0ed2c7d3..751ca29112 100644 --- a/style/components/switch.less +++ b/style/components/switch.less @@ -33,16 +33,10 @@ background-color: #ffffff; content: " "; cursor: pointer; - transform: scale(1); transition: left @switch-duration @ease-in-out-circ; - animation-timing-function: linear; - animation-duration: @switch-duration; - animation-name: rcSwitchOff; } &:hover:after{ - transform: scale(1.1); - animation-name: rcSwitchOn; } &-checked{ @@ -65,13 +59,10 @@ &:after{ background: #ccc; - animation-name: none; cursor: no-drop; } &:hover:after{ - transform: scale(1); - animation-name: none; } &-inner { @@ -79,26 +70,3 @@ } } } - -@keyframes rcSwitchOn { - 0% { - transform: scale(1); - } - 50% { - transform: scale(1.2); - } - 100% { - transform: scale(1.1); - } -} -@keyframes rcSwitchOff { - 0% { - transform: scale(1.1); - } - 50%{ - transform: scale(.9); - } - 100% { - transform: scale(1); - } -}