mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
MessageBox: fix text blur due to translating half pixel
This commit is contained in:
committed by
cinwell.li
parent
c2a937ce02
commit
d5eb9ac3b5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user