Skip to content

Commit b122278

Browse files
author
Taois
committed
feat:修复消息弹窗问题
1 parent 48d548c commit b122278

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

dashboard/src/components/actions/MsgBoxAction.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343
<!-- 消息内容 -->
4444
<div class="content-section">
4545
<!-- 主要消息 -->
46-
<div v-if="config.msg" class="message-container glass-effect">
46+
<div v-if="config.msg || config.htmlMsg" class="message-container glass-effect">
4747
<div class="message-bg gradient-primary"></div>
4848
<div class="message-content">
4949
<div class="message-icon">
5050
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
5151
<path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4l4 4 4-4h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
5252
</svg>
5353
</div>
54-
<div class="message-text" v-html="formatMessage(config.msg)"></div>
54+
<div class="message-text" v-html="formatMessage(config.htmlMsg || config.msg)"></div>
5555
</div>
5656
</div>
5757

@@ -74,7 +74,7 @@
7474
<div class="image-bg gradient-accent"></div>
7575
<img
7676
:src="config.imageUrl"
77-
:style="{ height: config.imageHeight ? `${config.imageHeight}px` : 'auto' }"
77+
:style="{ height: config.imageHeight ? `${config.imageHeight}px` : '200px' }"
7878
class="action-image-modern"
7979
@load="onImageLoad"
8080
@error="onImageError"
@@ -468,7 +468,7 @@ export default {
468468
<style scoped>
469469
/* 主容器 */
470470
.msgbox-action-modern {
471-
padding: 24px;
471+
padding: 16px;
472472
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
473473
border-radius: 16px;
474474
backdrop-filter: blur(10px);
@@ -542,7 +542,7 @@ export default {
542542
.icon-section {
543543
display: flex;
544544
justify-content: center;
545-
margin-bottom: 24px;
545+
margin-bottom: 16px;
546546
}
547547
548548
.icon-container {
@@ -617,12 +617,12 @@ export default {
617617
.content-section {
618618
display: flex;
619619
flex-direction: column;
620-
gap: 16px;
620+
gap: 12px;
621621
}
622622
623623
/* 消息容器 */
624624
.message-container {
625-
padding: 20px;
625+
padding: 16px;
626626
position: relative;
627627
}
628628
@@ -703,7 +703,8 @@ export default {
703703
704704
.action-image-modern {
705705
max-width: 100%;
706-
height: auto;
706+
height: 100px;
707+
object-fit: cover;
707708
border-radius: 12px;
708709
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
709710
position: relative;

0 commit comments

Comments
 (0)