feat: 多标签页聊天(实验性)

This commit is contained in:
MoonLeeeaf
2024-06-14 23:50:33 +08:00
parent 1a5afc8ad0
commit d42caea57a
6 changed files with 362 additions and 77 deletions

View File

@@ -42,6 +42,16 @@ const checkEmpty = (i) => {
return (i == null) || ("" === i) || (0 === i)
}
// AI的力量太强了
function getOffsetTop(parent, child) {
let top = 0
while (child && child !== parent) {
top += child.offsetTop
child = child.offsetParent
}
return top
}
function escapeHTML(str) {
return str.replace(/[<>&"']/g, function (match) {
switch (match) {