[Improvement] Cell: optimize left icon (#893)

This commit is contained in:
neverland
2018-04-19 16:10:37 +08:00
committed by GitHub
parent 24b95af824
commit 0192eb7ee8
10 changed files with 101 additions and 114 deletions

View File

@@ -9,12 +9,12 @@
}"
@click="onClick"
>
<div class="van-cell__title" v-if="title || icon || $slots.title || $slots.icon">
<slot name="icon">
<icon v-if="icon" :name="icon" />
</slot>
<slot name="icon">
<icon v-if="icon" class="van-cell__left-icon" :name="icon" />
</slot>
<div class="van-cell__title" v-if="title || $slots.title">
<slot name="title">
<span class="van-cell__text" v-text="title" />
<span v-text="title" />
<div class="van-cell__label" v-if="label" v-text="label" />
</slot>
</div>