From 73bcf9e5ee0d37bf769d1976bb792765c6facfb9 Mon Sep 17 00:00:00 2001 From: lee-zt <2960166273@qq.com> Date: Wed, 4 Jun 2025 21:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E4=B8=8D=E6=8D=A2=E8=A1=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vue-frontend/src/components/PostPage.vue | 2 +- .../vue-frontend/src/views/PostDetail.vue | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/PostPage.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/PostPage.vue index 3888c34..79e19ca 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/PostPage.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/PostPage.vue @@ -206,7 +206,7 @@ watch(selectedCategory, () => { box-sizing: border-box; width: 100%; height: 280px; - max-width: 100%; + max-width: 475px; overflow: hidden; } diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue index 7aeb158..7c95adc 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue @@ -387,17 +387,23 @@ onUnmounted(() => { .post-title { font-size: 32px; + max-width: 70%; margin-bottom: 10px; text-align: left; - padding-left: 5px; + padding-left: 5px; + word-break: break-all; /* 长单词或长串自动换行 */ + white-space: normal; } .post-body { font-size: 16px; + max-width: 70%; line-height: 1.5; margin-bottom: 20px; text-align: left; - padding-left: 16px; + padding-left: 16px; + word-break: break-all; /* 长单词或长串自动换行 */ + white-space: pre-line; } .post-stats { @@ -419,7 +425,7 @@ onUnmounted(() => { .comments-section { flex: 1 1 0; - min-height: 0; + min-height: 400px; background-color: #ffffff; padding: 20px; border: 1px solid #ccc; @@ -473,6 +479,8 @@ onUnmounted(() => { font-size: 14px; color: #333; text-align: left; + white-space: pre-line; /* 保留换行 */ + word-break: break-all; /* 长单词或长串自动换行 */ } .comment-meta {