@@ -39,10 +39,10 @@ const toggle = () => {
3939 size,
4040 border,
4141 model ? 'on' : 'off',
42- disabled ? 'disabled' : '',
4342 border === 'square' ? 'rounded-4' : 'rounded-full',
43+ { 'cursor-not-allowed': disabled },
4444 ]"
45- class =" gui-switch relative cursor-pointer h-24 inline-flex items-center text-12"
45+ class =" gui-switch relative cursor-pointer h-24 inline-flex items-center text-12 duration-200 "
4646 >
4747 <div
4848 :class =" [border === 'square' ? 'rounded-4' : 'rounded-full']"
@@ -59,9 +59,9 @@ const toggle = () => {
5959<style lang="less" scoped>
6060.gui-switch {
6161 min-width : 50px ;
62- .slot {
63- transition : margin 0.2s ;
64- }
62+ // .slot {
63+ // transition: margin 0.2s;
64+ // }
6565}
6666
6767.small {
@@ -81,6 +81,9 @@ const toggle = () => {
8181.on {
8282 color : #fff ;
8383 background-color : var (--switch-on-bg );
84+ & :hover {
85+ background-color : var (--switch-on-hover-bg );
86+ }
8487 .dot {
8588 left : calc (100% - 22px );
8689 background-color : var (--switch-on-dot-bg );
@@ -115,6 +118,9 @@ const toggle = () => {
115118.off {
116119 color : var (--card-color );
117120 background-color : var (--switch-off-bg );
121+ & :hover {
122+ background-color : var (--switch-off-hover-bg );
123+ }
118124 .dot {
119125 left : 4px ;
120126 background-color : var (--switch-off-dot-bg );
@@ -142,8 +148,4 @@ const toggle = () => {
142148 }
143149 }
144150}
145-
146- .disabled {
147- cursor : not-allowed ;
148- }
149151 </style >
0 commit comments