feat: 删除无用依赖,shiki lang使用懒加载方式加载语言
This commit is contained in:
@@ -140,6 +140,8 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
||||
const article = document.querySelector(".markdown-body")!;
|
||||
const images = Array.from(article.querySelectorAll("img"));
|
||||
|
||||
if(images.length === 0) return
|
||||
|
||||
const waitImageLoaded = (img: HTMLImageElement) => {
|
||||
if (img.complete && img.naturalWidth > 0 && img.naturalHeight > 0) {
|
||||
return Promise.resolve();
|
||||
|
||||
Reference in New Issue
Block a user