添加移动端点击自动关闭侧边栏 (#271)

This commit is contained in:
h2o2o
2022-10-11 08:12:35 +08:00
committed by GitHub
parent 1aa9963e07
commit 315ab94c94
4 changed files with 11 additions and 2 deletions

View File

@ -134,3 +134,8 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
const text = tempEl.innerText;
return text;
};
export function closeSidebar() {
const sidebarEl = document.body.querySelector(".sidebar-wrapper") as HTMLDivElement;
sidebarEl.style.display = "none";
}