[Improvement] Dialog: optimize style without content (#1233)

This commit is contained in:
neverland
2018-06-06 20:18:32 +08:00
committed by GitHub
parent 74aa001bb6
commit 14522d52bd
5 changed files with 75 additions and 14 deletions

View File

@@ -2,12 +2,12 @@
<transition name="van-dialog-bounce">
<div v-show="value" :class="[b(), className]">
<div v-if="title" v-text="title" :class="b('header')" />
<div :class="b('content')" class="van-hairline">
<div :class="b('content')" v-if="message || $slots.default">
<slot>
<div v-if="message" v-html="message" :class="b('message', { withtitle: title })" />
<div v-if="message" v-html="message" :class="b('message', { 'has-title': title })" />
</slot>
</div>
<div :class="b('footer', { 'buttons': showCancelButton && showConfirmButton })">
<div class="van-hairline--top" :class="b('footer', { 'buttons': showCancelButton && showConfirmButton })">
<van-button
v-show="showCancelButton"
:loading="loading.cancel"