杂务:更新 YumiNail 工作区
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { BellOutlined, ClockCircleOutlined } from '@ant-design/icons-vue'
|
||||
import { renderRichContent } from '@/utils/rich-content'
|
||||
|
||||
/**
|
||||
* Purpose: props supports SystemMessageCard.vue by holding or executing the props page or API role.
|
||||
@@ -43,6 +44,7 @@ const displayTitle = computed(() => props.title?.trim() || '系统消息')
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const displayContent = computed(() => props.content?.trim() || (hasImage.value ? '' : '你收到了一条新的系统消息。'))
|
||||
const displayContentHtml = computed(() => renderRichContent(displayContent.value))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -75,7 +77,7 @@ const displayContent = computed(() => props.content?.trim() || (hasImage.value ?
|
||||
<span>{{ meta }}</span>
|
||||
</div>
|
||||
|
||||
<p v-if="displayContent" class="system-message-card__content">{{ displayContent }}</p>
|
||||
<div v-if="displayContentHtml" class="system-message-card__content" v-html="displayContentHtml"></div>
|
||||
</section>
|
||||
|
||||
<footer v-if="$slots.footer" class="system-message-card__footer">
|
||||
@@ -170,7 +172,7 @@ const displayContent = computed(() => props.content?.trim() || (hasImage.value ?
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
line-height: 1.35;
|
||||
overflow-wrap: anywhere;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.system-message-card__meta {
|
||||
@@ -183,7 +185,7 @@ const displayContent = computed(() => props.content?.trim() || (hasImage.value ?
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.system-message-card__content {
|
||||
@@ -192,8 +194,51 @@ const displayContent = computed(() => props.content?.trim() || (hasImage.value ?
|
||||
font-size: 15px;
|
||||
line-height: 1.75;
|
||||
text-align: left;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(*) {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(p),
|
||||
.system-message-card__content :deep(ul),
|
||||
.system-message-card__content :deep(ol),
|
||||
.system-message-card__content :deep(blockquote),
|
||||
.system-message-card__content :deep(pre),
|
||||
.system-message-card__content :deep(table) {
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(p:last-child),
|
||||
.system-message-card__content :deep(ul:last-child),
|
||||
.system-message-card__content :deep(ol:last-child),
|
||||
.system-message-card__content :deep(blockquote:last-child),
|
||||
.system-message-card__content :deep(pre:last-child),
|
||||
.system-message-card__content :deep(table:last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(ul),
|
||||
.system-message-card__content :deep(ol) {
|
||||
padding-left: 1.25em;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(a) {
|
||||
color: var(--theme-primary);
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(img) {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.system-message-card__content :deep(pre) {
|
||||
overflow-x: auto;
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--theme-primary-soft);
|
||||
}
|
||||
|
||||
.system-message-card__footer {
|
||||
|
||||
Reference in New Issue
Block a user