ui switch 加上 disabled 切换动画、去除 iOS 点击时的叠影

This commit is contained in:
itorr
2022-08-12 18:21:44 +08:00
parent 06a4d49908
commit b3945c132b
2 changed files with 3 additions and 1 deletions

View File

@@ -228,6 +228,7 @@ footer{
}
}
}
transition: opacity .3s ease;;
&[data-disabled="true"]{
opacity: 0.5;
pointer-events: none;

View File

@@ -2,7 +2,8 @@ Vue.component('ui-switch',{
template: `<span class="ui-switch-box"
:data-checked="value"
:data-disabled="disabled"
@click="_switch">
@touchend.prevent.stop="_switch"
@click.prevent.stop="_switch">
<a class="switch" :style="{color}">
<i class="slider"></i>
</a>