This commit is contained in:
cookfront
2017-03-30 17:40:15 +08:00
parent 09be7c9323
commit e241d92cd9
5 changed files with 132 additions and 30 deletions

View File

@@ -1,18 +1,23 @@
<template>
<a class="zan-cell" :href="url" @click="handleClick">
<div :class="{ 'zan-cell__title': true, 'zan-cell__required': required }" v-if="this.$slots.title || title || label">
<slot name="icon">
<i v-if="icon" class="zan-icon" :class="'zan-icon-' + icon"></i>
</slot>
<div
:class="{ 'zan-cell__title': true, 'zan-cell__required': required }"
v-if="this.$slots.title || title"
>
<i v-if="icon" class="zan-icon" :class="'zan-icon-' + icon"></i>
<slot name="title">
<span class="zan-cell__text" v-text="title"></span>
<span class="zan-cell__label" v-if="label" v-text="label"></span>
</slot>
</div>
<div class="zan-cell__value" v-if="value || this.$slots.default" :class="{
'is-link': isLink,
'is-alone': !this.$slots.title && !title && !label
}">
<div
class="zan-cell__value"
v-if="value || this.$slots.default"
:class="{
'is-link': isLink,
'is-alone': !this.$slots.title && !title && !label
}"
>
<slot>
<span v-text="value"></span>
</slot>