From 6c28fccb50fce1a728230d36d7dcfde63061e9e8 Mon Sep 17 00:00:00 2001 From: HcGys <370379459@qq.com> Date: Fri, 24 May 2024 14:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/view/components/TkComment.vue | 4 ++-- src/client/view/components/TkSubmit.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/view/components/TkComment.vue b/src/client/view/components/TkComment.vue index be692689b..163b0fb2a 100644 --- a/src/client/view/components/TkComment.vue +++ b/src/client/view/components/TkComment.vue @@ -198,7 +198,7 @@ export default { } }, showContentExpandIfNeed () { - this.hasContentExpand = this.$refs['tk-content'].scrollHeight > 500 + this.hasContentExpand = this.hasContentExpand || this.$refs['tk-content'].scrollHeight > 500 // 如果已经折叠就不再判断 主要是为了防止图片在onload之前就已经折叠而导致图片在onload之后取消折叠 }, showContentExpandIfNeedAfterImagesLoaded () { this.$refs['tk-content'].querySelectorAll('img').forEach((imgEl) => { @@ -334,7 +334,7 @@ export default { handler: function (highlight) { if (highlight === 'true') { this.$nextTick(() => { - renderCode(this.$refs.comment, this.config.HIGHLIGHT_THEME, this.serverConfig.HIGHLIGHT_PLUGIN) + renderCode(this.$refs.comment, this.config.HIGHLIGHT_THEME, this.config.HIGHLIGHT_PLUGIN) }) } }, diff --git a/src/client/view/components/TkSubmit.vue b/src/client/view/components/TkSubmit.vue index fef2fad7b..511f5f7cd 100644 --- a/src/client/view/components/TkSubmit.vue +++ b/src/client/view/components/TkSubmit.vue @@ -202,7 +202,7 @@ export default { renderLinks(this.$refs['comment-preview']) renderMath(this.$refs['comment-preview'], this.$twikoo.katex) if (this.config.HIGHLIGHT === 'true') { - renderCode(this.$refs['comment-preview'], this.config.HIGHLIGHT_THEME, this.serverConfig.HIGHLIGHT_PLUGIN) + renderCode(this.$refs['comment-preview'], this.config.HIGHLIGHT_THEME, this.config.HIGHLIGHT_PLUGIN) } }) }