MessageBox: fix text blur due to translating half pixel

This commit is contained in:
Leopoldthecoder
2016-11-05 20:40:00 +08:00
committed by cinwell.li
parent c2a937ce02
commit d5eb9ac3b5
3 changed files with 42 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="el-message-box__wrapper">
<transition name="msgbox-fade">
<div class="el-message-box" v-show="value">
<transition name="msgbox-fade">
<div class="el-message-box__wrapper" v-show="value" @click.self="handleWrapperClick">
<div class="el-message-box">
<div class="el-message-box__header" v-if="title !== ''">
<div class="el-message-box__title">{{ title }}</div>
<i class="el-message-box__close el-icon-close" @click="handleAction('cancel')" v-if="showClose"></i>
@@ -19,8 +19,8 @@
<el-button ref="confirm" :class="[ confirmButtonClasses ]" v-show="showConfirmButton" @click.native="handleAction('confirm')">{{ confirmButtonText }}</el-button>
</div>
</div>
</transition>
</div>
</div>
</transition>
</template>
<script type="text/babel">
@@ -101,6 +101,12 @@
}
},
handleWrapperClick() {
if (this.closeOnClickModal) {
this.close();
}
},
handleAction(action) {
if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) {
return;