feat:弹框修改
Showing
2 changed files
with
15 additions
and
6 deletions
... | @@ -3,12 +3,19 @@ | ... | @@ -3,12 +3,19 @@ |
3 | <div class="el-message-box__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClick" role="dialog" | 3 | <div class="el-message-box__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClick" role="dialog" |
4 | aria-modal="true" :aria-label="title || 'dialog'"> | 4 | aria-modal="true" :aria-label="title || 'dialog'"> |
5 | <div class="el-message-box" :class="[customClass, center && 'el-message-box--center']"> | 5 | <div class="el-message-box" :class="[customClass, center && 'el-message-box--center']"> |
6 | <div class="el-message-box__header" v-if="title !== null"> | ||
7 | <div class="el-message-box__title"> | ||
8 | <span>标题:{{ title }}</span> | ||
9 | </div> | ||
10 | <button type="button" class="el-message-box__headerbtn" aria-label="Close" v-if="showClose" | ||
11 | @click="handleAction(distinguishCancelAndClose ? 'close' : 'cancel')" | ||
12 | @keydown.enter="handleAction(distinguishCancelAndClose ? 'close' : 'cancel')"> | ||
13 | <i class="el-message-box__close el-icon-close"></i> | ||
14 | </button> | ||
15 | </div> | ||
6 | <div class="el-message-box__content"> | 16 | <div class="el-message-box__content"> |
7 | <div class="el-message-box__container"> | ||
8 | <div v-if="title !== ''" class="message-title">标题:{{ title }}</div> | ||
9 | <div v-if="message !== ''" class="richText" v-html="message"></div> | 17 | <div v-if="message !== ''" class="richText" v-html="message"></div> |
10 | </div> | 18 | </div> |
11 | </div> | ||
12 | <div class="el-message-box__btns"> | 19 | <div class="el-message-box__btns"> |
13 | <el-button :loading="cancelButtonLoading" :class="[cancelButtonClasses]" :round="roundButton" size="small" | 20 | <el-button :loading="cancelButtonLoading" :class="[cancelButtonClasses]" :round="roundButton" size="small" |
14 | @click.native="handleAction('cancel')" @keydown.enter="handleAction('cancel')"> | 21 | @click.native="handleAction('cancel')" @keydown.enter="handleAction('cancel')"> |
... | @@ -283,4 +290,8 @@ export default { | ... | @@ -283,4 +290,8 @@ export default { |
283 | width: 100%; | 290 | width: 100%; |
284 | height: 100%; | 291 | height: 100%; |
285 | } | 292 | } |
293 | |||
294 | /deep/.el-message-box__content { | ||
295 | padding-top: 0; | ||
296 | } | ||
286 | </style> | 297 | </style> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <template> | 1 | <template> |
2 | <transition name="dialog-fade" mode="out-in" v-if="myShow"> | 2 | <transition name="msgbox-fade" v-if="myShow"> |
3 | <div class="ls-mask" v-loading="loading"> | 3 | <div class="ls-mask" v-loading="loading"> |
4 | <div class="ls-mask-window" :style="{ 'width': width }"> | 4 | <div class="ls-mask-window" :style="{ 'width': width }"> |
5 | <div class="ls-head"> | 5 | <div class="ls-head"> |
... | @@ -51,9 +51,7 @@ export default { | ... | @@ -51,9 +51,7 @@ export default { |
51 | isShow (newValue) { | 51 | isShow (newValue) { |
52 | this.editItem = this.loadViewFn(this.editItem) | 52 | this.editItem = this.loadViewFn(this.editItem) |
53 | document.body.appendChild(this.$el); | 53 | document.body.appendChild(this.$el); |
54 | this.$nextTick(() => { | ||
55 | this.myShow = newValue | 54 | this.myShow = newValue |
56 | }) | ||
57 | } | 55 | } |
58 | }, | 56 | }, |
59 | mounted () { | 57 | mounted () { | ... | ... |
-
Please register or sign in to post a comment