From d858172ddf26b4344a342f755129b3afca0b6ce1 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Mon, 6 Mar 2023 20:45:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(news):=20=E6=A0=B7=E5=BC=8F=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/News.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/News.vue b/src/pages/News.vue index 178a60b9..df6e6495 100644 --- a/src/pages/News.vue +++ b/src/pages/News.vue @@ -148,10 +148,10 @@ export default defineComponent({ const postHtml = new DOMParser().parseFromString(post.content, "text/html"); // 用帖子标题替换 html 中的标题 postHtml.title = post.subject; - // html 两侧添加 12% 的空白 - postHtml.body.style.margin = "0 12%"; + // 四周留白 + postHtml.body.style.padding = "12%"; postHtml.querySelectorAll("img").forEach(img => { - img.style.width = "75%"; + img.style.width = "100%"; }); // 将 html 转为能够通过 window.open 打开的 url const postUrl = URL.createObjectURL( @@ -188,9 +188,7 @@ export default defineComponent({