mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-06 09:13:47 +08:00
fixed bug for code hightline
This commit is contained in:
@@ -77,20 +77,10 @@ export default defineComponent({
|
|||||||
margin-top 0
|
margin-top 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//.cursor {
|
p > code {
|
||||||
// height 24px;
|
color #cc0000
|
||||||
// border-left 1px solid black;
|
background-color #f1f1f1
|
||||||
//
|
}
|
||||||
// animation: cursorImg 1s infinite steps(1, start);
|
|
||||||
// @keyframes cursorImg {
|
|
||||||
// 0%, 100% {
|
|
||||||
// opacity: 0;
|
|
||||||
// }
|
|
||||||
// 50% {
|
|
||||||
// opacity: 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
this.chatBoxHeight = window.innerHeight - this.toolBoxHeight;
|
this.chatBoxHeight = window.innerHeight - this.toolBoxHeight;
|
||||||
// this.inputBoxWidth = window.innerWidth - 20;
|
this.inputBoxWidth = window.innerWidth - 20;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.connect();
|
this.connect();
|
||||||
@@ -341,8 +341,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
hl.configure({ignoreUnescapedHTML: true})
|
hl.configure({ignoreUnescapedHTML: true})
|
||||||
const lines = document.querySelectorAll('.chat-line');
|
const blocks = document.querySelector("#chat-box").querySelectorAll('pre code');
|
||||||
const blocks = lines[lines.length - 1].querySelectorAll('pre code');
|
|
||||||
blocks.forEach((block) => {
|
blocks.forEach((block) => {
|
||||||
hl.highlightElement(block)
|
hl.highlightElement(block)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user