mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[Improvement] component use bem mixin (#921)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<transition name="van-dialog-bounce">
|
||||
<div class="van-dialog" v-show="value">
|
||||
<div class="van-dialog__header" v-if="title" v-text="title" />
|
||||
<div class="van-dialog__content van-hairline">
|
||||
<div v-show="value" :class="b()">
|
||||
<div v-if="title" v-text="title" :class="b('header')" />
|
||||
<div :class="b('content')" class="van-hairline">
|
||||
<slot>
|
||||
<div class="van-dialog__message" v-if="message" :class="{ 'van-dialog__message--withtitle': title }" v-html="message" />
|
||||
<div v-if="message" v-html="message" :class="b('message', { withtitle: title })" />
|
||||
</slot>
|
||||
</div>
|
||||
<div class="van-dialog__footer" :class="{ 'is-twobtn': showCancelButton && showConfirmButton }">
|
||||
<div :class="b('footer', { 'buttons': showCancelButton && showConfirmButton })">
|
||||
<van-button
|
||||
v-show="showCancelButton"
|
||||
:loading="loading.cancel"
|
||||
size="large"
|
||||
class="van-dialog__cancel"
|
||||
:class="b('cancel')"
|
||||
@click="handleAction('cancel')"
|
||||
>
|
||||
{{ cancelButtonText || $t('cancel') }}
|
||||
@@ -21,8 +21,7 @@
|
||||
v-show="showConfirmButton"
|
||||
size="large"
|
||||
:loading="loading.confirm"
|
||||
class="van-dialog__confirm"
|
||||
:class="{ 'van-hairline--left': showCancelButton && showConfirmButton }"
|
||||
:class="[b('confirm'), { 'van-hairline--left': showCancelButton && showConfirmButton }]"
|
||||
@click="handleAction('confirm')"
|
||||
>
|
||||
{{ confirmButtonText || $t('confirm') }}
|
||||
|
Reference in New Issue
Block a user