mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Improvement] Panel: use cell instead of extra style (#927)
This commit is contained in:
parent
ba33733bd1
commit
effc9591a3
@ -1,19 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="van-panel van-hairline--top-bottom">
|
<cell-group :class="b()">
|
||||||
<div class="van-panel__header van-hairline--bottom">
|
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<div class="van-panel__title" v-text="title" />
|
<cell :class="b('header')" :title="title" :label="desc" :value="status" />
|
||||||
<span class="van-panel__desc" v-if="desc" v-text="desc" />
|
|
||||||
<span class="van-panel__status" v-if="status" v-text="status" />
|
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
<div :class="b('content')">
|
||||||
<div class="van-panel__content">
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<div class="van-panel__footer van-hairline--top" v-if="$slots.footer">
|
<div v-if="$slots.footer" :class="b('footer')" class="van-hairline--top">
|
||||||
<slot name="footer" />
|
<slot name="footer" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</cell-group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -4,26 +4,10 @@
|
|||||||
background: $white;
|
background: $white;
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
padding: 10px 15px;
|
.van-cell__value {
|
||||||
}
|
|
||||||
|
|
||||||
&__title {
|
|
||||||
font-size: 14px;
|
|
||||||
color: $text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__desc {
|
|
||||||
font-size: 12px;
|
|
||||||
color: $gray-darker;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__status {
|
|
||||||
font-size: 14px;
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
right: 15px;
|
|
||||||
color: $red;
|
color: $red;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__footer {
|
&__footer {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user