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