chore: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-11-11 11:53:54 +08:00
parent 1bafbeaab7
commit d53496e495
16 changed files with 1090 additions and 784 deletions

View File

@@ -24,11 +24,11 @@ function hoverTitle() {
function hoverDescription(event, description) {
// currentWidth 为文本在页面中所占的宽度创建标签加入到页面获取currentWidth ,最后在移除
let tempTag = document.createElement("span");
const tempTag = document.createElement("span");
tempTag.innerText = description;
tempTag.className = "getDescriptionWidth";
document.querySelector("body").appendChild(tempTag);
let currentWidth = (
const currentWidth = (
document.querySelector(".getDescriptionWidth") as HTMLSpanElement
).offsetWidth;
document.querySelector(".getDescriptionWidth").remove();