mirror of
https://github.com/youzan/vant.git
synced 2025-12-19 01:02:29 +08:00
fix cell
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user