mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 09:26:43 +08:00
feat(case): 支持消息内容Markdown渲染并优化样式
- 消息内容支持Markdown格式渲染 - 注释掉推荐问题模块,暂时不显示 - 调整消息气泡样式,去除背景色和边框 - 修改消息气泡圆角大小,提升视觉效果 - 调整链接颜色为黑色,增强可读性- 提高打字机效果速度,改善用户体验
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
ref="contentContainer"
|
||||
class="message-content"
|
||||
v-katex:auto
|
||||
v-html="displayText"
|
||||
v-html="md.render(displayText)"
|
||||
></div>
|
||||
|
||||
<!-- 引用案例 -->
|
||||
@@ -51,19 +51,19 @@
|
||||
</div>
|
||||
|
||||
<!-- 推荐问题 -->
|
||||
<div v-if="suggestions && suggestions.length > 0" class="suggestions">
|
||||
<div class="suggestions-title">💡 推荐问题</div>
|
||||
<div class="suggestions-list">
|
||||
<button
|
||||
v-for="(item, index) in suggestions"
|
||||
:key="index"
|
||||
class="suggestions-item"
|
||||
@click="$emit('suggestion-click', item)"
|
||||
>
|
||||
{{ item }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="suggestions && suggestions.length > 0" class="suggestions">-->
|
||||
<!-- <div class="suggestions-title">💡 推荐问题</div>-->
|
||||
<!-- <div class="suggestions-list">-->
|
||||
<!-- <button-->
|
||||
<!-- v-for="(item, index) in suggestions"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- class="suggestions-item"-->
|
||||
<!-- @click="$emit('suggestion-click', item)"-->
|
||||
<!-- >-->
|
||||
<!-- {{ item }}-->
|
||||
<!-- </button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -248,9 +248,9 @@ export default {
|
||||
font-size: 12px !important;
|
||||
margin-top: 8px;
|
||||
padding: 6px 10px;
|
||||
background-color: #f9f9f9;
|
||||
//background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
//border: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ export default {
|
||||
padding: 8px 15px;
|
||||
max-width: 80%;
|
||||
background-color: #e4e7ed;
|
||||
border-radius: 18px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
word-break: break-word;
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #1a73e8;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
const typingSpeed = 50; // 每个字符的间隔时间(毫秒)
|
||||
const typingSpeed = 30; // 每个字符的间隔时间(毫秒)
|
||||
|
||||
typingTimer = setInterval(() => {
|
||||
// 计算下一个要显示的字符索引
|
||||
|
||||
Reference in New Issue
Block a user