Skip to content

Commit

Permalink
MessageBox: fix icon position error (ElemeFE#17410)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptru authored and lzq4047 committed May 22, 2020
1 parent b56b04b commit 5ed7fb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
20 changes: 11 additions & 9 deletions packages/message-box/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@
</button>
</div>
<div class="el-message-box__content">
<div
:class="['el-message-box__status', icon]"
v-if="icon && !center && message !== ''">
</div>
<div class="el-message-box__message" v-if="message !== ''">
<slot>
<p v-if="!dangerouslyUseHTMLString">{{ message }}</p>
<p v-else v-html="message"></p>
</slot>
<div class="el-message-box__container">
<div
:class="['el-message-box__status', icon]"
v-if="icon && !center && message !== ''">
</div>
<div class="el-message-box__message" v-if="message !== ''">
<slot>
<p v-if="!dangerouslyUseHTMLString">{{ message }}</p>
<p v-else v-html="message"></p>
</slot>
</div>
</div>
<div class="el-message-box__input" v-show="showInput">
<el-input
Expand Down
5 changes: 4 additions & 1 deletion packages/theme-chalk/src/message-box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,14 @@
}

@include e(content) {
position: relative;
padding: 10px $--msgbox-padding-primary;
color: $--messagebox-content-color;
font-size: $--messagebox-content-font-size;
}

@include e(container) {
position: relative;
}

@include e(input) {
padding-top: 15px;
Expand Down

0 comments on commit 5ed7fb4

Please sign in to comment.