perf: 优化机器人回复

This commit is contained in:
kuaifan 2024-04-11 10:12:50 +08:00
parent 985c5ff54b
commit ae83fce524
3 changed files with 18 additions and 10 deletions

View File

@ -25,7 +25,7 @@ const MarkdownUtils = {
export function MarkdownConver(text) {
if (text === '...') {
return '<p><span class="input-blink"></span>&nbsp;</p>'
return '<div class="input-blink"></div>'
}
if (MarkdownUtils.mdi === null) {
MarkdownUtils.mdi = new MarkdownIt({

View File

@ -74,6 +74,10 @@ body {
}
.input-blink {
width: 10px;
height: 20px;
position: relative;
&:before {
position: absolute;
content: '';
display: inline-block;
@ -84,6 +88,7 @@ body {
animation: blink-animate 1.2s infinite steps(1, start);
}
}
}
.self {
.markdown-body {

View File

@ -578,7 +578,9 @@
}
.item-leave {
pre, code {
pre,
code,
.markdown-body {
visibility: hidden;
}
}
@ -774,6 +776,7 @@
}
.markdown-body {
min-height: 20px;
line-height: 20px;
}