diff --git a/public/markdowns/Git.md b/public/markdowns/Git.md index 1477a58..5152206 100644 --- a/public/markdowns/Git.md +++ b/public/markdowns/Git.md @@ -7,6 +7,7 @@ categories: - Git description: Git快速入门教程 abbrlink: a97adaa0 +date: 2023-8-13 --- # 1、Git概述 diff --git "a/public/markdowns/Redis\345\205\245\351\227\250.md" "b/public/markdowns/Redis\345\205\245\351\227\250.md" index 8e3f2a4..cedaf2b 100644 --- "a/public/markdowns/Redis\345\205\245\351\227\250.md" +++ "b/public/markdowns/Redis\345\205\245\351\227\250.md" @@ -7,6 +7,7 @@ categories: - Redis description: Redis的快速入门教程 abbrlink: 6a343b7f +date: 2023-8-13 --- # Redis入门 diff --git "a/public/markdowns/Redis\345\237\272\347\241\200\347\257\207.md" "b/public/markdowns/Redis\345\237\272\347\241\200\347\257\207.md" index 22913b0..d171688 100644 --- "a/public/markdowns/Redis\345\237\272\347\241\200\347\257\207.md" +++ "b/public/markdowns/Redis\345\237\272\347\241\200\347\257\207.md" @@ -6,6 +6,7 @@ categories: - Redis description: Redis基础篇 abbrlink: 4604f75b +date: 2023-8-27 --- # 初识Redis diff --git "a/public/markdowns/Redis\345\256\236\346\210\230\347\257\207.md" "b/public/markdowns/Redis\345\256\236\346\210\230\347\257\207.md" index 3e76a39..b7a646b 100644 --- "a/public/markdowns/Redis\345\256\236\346\210\230\347\257\207.md" +++ "b/public/markdowns/Redis\345\256\236\346\210\230\347\257\207.md" @@ -6,6 +6,7 @@ categories: - Redis description: Redis实战篇 abbrlink: 4604f75b +date: 2023-8-28 --- # 短信登录 diff --git "a/public/markdowns/SpringBoot2\345\237\272\347\241\200\347\257\207.md" "b/public/markdowns/SpringBoot2\345\237\272\347\241\200\347\257\207.md" index 685357e..ed46c0b 100644 --- "a/public/markdowns/SpringBoot2\345\237\272\347\241\200\347\257\207.md" +++ "b/public/markdowns/SpringBoot2\345\237\272\347\241\200\347\257\207.md" @@ -6,6 +6,7 @@ categories: - SpringBoot description: SpringBoot2基础篇 abbrlink: bd45f405 +date: 2023-9-07 --- # 小技巧(隐藏指定文件/文件夹) diff --git "a/public/markdowns/SpringBoot2\351\253\230\347\272\247\347\257\207.md" "b/public/markdowns/SpringBoot2\351\253\230\347\272\247\347\257\207.md" index bc9cdcf..ad401f3 100644 --- "a/public/markdowns/SpringBoot2\351\253\230\347\272\247\347\257\207.md" +++ "b/public/markdowns/SpringBoot2\351\253\230\347\272\247\347\257\207.md" @@ -6,6 +6,7 @@ categories: - SpringBoot description: SpringBoot2高级篇 abbrlink: '28014337' +date: 2023-9-10 --- # 运维篇 diff --git a/public/markdowns/SpringBoot3.md b/public/markdowns/SpringBoot3.md index aee3da0..86bf984 100644 --- a/public/markdowns/SpringBoot3.md +++ b/public/markdowns/SpringBoot3.md @@ -6,4 +6,5 @@ categories: - SpringBoot description: SpringBoot3 abbrlink: 55656a4d +date: 2023-09-04 --- diff --git a/public/markdowns/Vue.md b/public/markdowns/Vue.md index 74b7656..f43558d 100644 --- a/public/markdowns/Vue.md +++ b/public/markdowns/Vue.md @@ -6,6 +6,7 @@ categories: - 前端 description: Vue2 abbrlink: 4d45ebbb +date: 2023-09-19 --- # Vue核心 diff --git "a/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226.md" "b/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226.md" index f07de82..42b325e 100644 --- "a/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226.md" +++ "b/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226.md" @@ -8,6 +8,7 @@ categories: - 瑞吉外卖 description: SpringBoot+vue实现的瑞吉外卖项目 abbrlink: a1e1aa91 +date: 2023-08-13 --- diff --git "a/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226\344\274\230\345\214\226.md" "b/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226\344\274\230\345\214\226.md" index fa83f9f..8d4966b 100644 --- "a/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226\344\274\230\345\214\226.md" +++ "b/public/markdowns/\347\221\236\345\220\211\345\244\226\345\215\226\344\274\230\345\214\226.md" @@ -8,6 +8,7 @@ categories: - 瑞吉外卖优化 description: 瑞吉外卖的优化 abbrlink: ea7374cf +date: 2023-08-13 --- # 缓存优化 diff --git a/src/components/Main.vue b/src/components/Main.vue index c7ff3fd..8e57359 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -1,21 +1,11 @@ @@ -71,7 +61,6 @@ export default { `${baseUrl}markdowns/${encodeURIComponent(fileName)}` ); const data = await response.text(); - // 使用正则表达式去除 Markdown 开头的元数据部分 const contentWithoutMetadata = data .replace(/---[\s\S]*?---/, "") @@ -81,27 +70,6 @@ export default { // 使用 nextTick 确保在 DOM 更新后执行 await nextTick(); - - // 获取类名为 markdown-content 的元素 - const imgsContainer = document.querySelector(".markdown-content"); - - // 获取该元素下的所有 img 标签,包括嵌套在 p 标签中的 img - const imgList = imgsContainer.querySelectorAll("img"); - - // 遍历每个 img 标签并设置其宽度 - imgList.forEach((img) => { - img.onload = () => { - // 检查 img 的宽度是否大于其父元素的宽度 - if (img.offsetWidth > img.parentElement.offsetWidth) { - img.style.width = "100%"; // 如果大于,设置为100% - } - }; - - // 如果图片已经加载(例如缓存的情况),也要立即设置宽度 - if (img.complete) { - img.onload(); // 手动触发 onload 事件 - } - }); } catch (error) { console.error("Error loading markdown file:", error); } @@ -121,113 +89,4 @@ export default {