mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
[new feature] Cell: add title-class、value-class、label-class (#2138)
This commit is contained in:
parent
8925d6599a
commit
8dc060e50f
@ -98,5 +98,9 @@
|
|||||||
.van-cell__title {
|
.van-cell__title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.van-cell__label {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,20 +20,20 @@
|
|||||||
</slot>
|
</slot>
|
||||||
<div
|
<div
|
||||||
v-if="isDef(title) || $slots.title"
|
v-if="isDef(title) || $slots.title"
|
||||||
:class="b('title')"
|
:class="[b('title'), titleClass]"
|
||||||
>
|
>
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span v-text="title" />
|
<span v-text="title" />
|
||||||
<div
|
<div
|
||||||
v-if="label"
|
v-if="label"
|
||||||
v-text="label"
|
v-text="label"
|
||||||
:class="b('label')"
|
:class="[b('label'), labelClass]"
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="isDef(value) || $slots.default"
|
v-if="isDef(value) || $slots.default"
|
||||||
:class="b('value', { alone: !$slots.title && !title })"
|
:class="[b('value', { alone: !$slots.title && !title }), valueClass]"
|
||||||
>
|
>
|
||||||
<slot>
|
<slot>
|
||||||
<span v-text="value" />
|
<span v-text="value" />
|
||||||
@ -67,13 +67,16 @@ export default create({
|
|||||||
props: {
|
props: {
|
||||||
icon: String,
|
icon: String,
|
||||||
size: String,
|
size: String,
|
||||||
label: String,
|
|
||||||
center: Boolean,
|
center: Boolean,
|
||||||
isLink: Boolean,
|
isLink: Boolean,
|
||||||
required: Boolean,
|
required: Boolean,
|
||||||
clickable: Boolean,
|
clickable: Boolean,
|
||||||
|
titleClass: String,
|
||||||
|
valueClass: String,
|
||||||
|
labelClass: String,
|
||||||
title: [String, Number],
|
title: [String, Number],
|
||||||
value: [String, Number],
|
value: [String, Number],
|
||||||
|
label: [String, Number],
|
||||||
arrowDirection: String,
|
arrowDirection: String,
|
||||||
border: {
|
border: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user