Switch 组件: 个人建议加了动画效果 (#59)

This commit is contained in:
BosenY 2017-07-25 15:47:31 +08:00 committed by 张敏
parent 86d6b7097f
commit 765a97106a
2 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,7 @@
:maxlength="maxlength" :maxlength="maxlength"
:disabled="disabled" :disabled="disabled"
:readonly="readonly"> :readonly="readonly">
<van-icon v-if="icon" :name="icon" class="van-field__icon" @click="onIconClick"></van-icon> <van-icon v-if="icon && currentValue" :name="icon" class="van-field__icon" @click="onIconClick"></van-icon>
</van-cell> </van-cell>
</template> </template>

View File

@ -24,6 +24,7 @@
left: 1px; left: 1px;
top: 1px; top: 1px;
z-index: 2; z-index: 2;
transition: transform .3s;
&::after { &::after {
@mixin border-retina (top, right, bottom, left), rgba(0, 0, 0, .1); @mixin border-retina (top, right, bottom, left), rgba(0, 0, 0, .1);
border-radius: 27px; border-radius: 27px;