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,14 +74,19 @@ body {
}
.input-blink {
position: absolute;
content: '';
display: inline-block;
width: 2px;
height: 16px;
top: 50%;
transform: translateY(-50%);
animation: blink-animate 1.2s infinite steps(1, start);
width: 10px;
height: 20px;
position: relative;
&:before {
position: absolute;
content: '';
display: inline-block;
width: 2px;
height: 16px;
top: 50%;
transform: translateY(-50%);
animation: blink-animate 1.2s infinite steps(1, start);
}
}
}

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;
}