From fe01efbf85829224a90a001b5d75c30e3c933245 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Tue, 9 May 2023 18:40:11 +0800 Subject: [PATCH] =?UTF-8?q?perf(web):=20=E5=87=8F=E5=B0=91=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=AD=97=E6=95=B0=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/web/src/components/ChapterContent.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/web/src/components/ChapterContent.vue b/modules/web/src/components/ChapterContent.vue index 0cc720106..04ff1697a 100644 --- a/modules/web/src/components/ChapterContent.vue +++ b/modules/web/src/components/ChapterContent.vue @@ -3,7 +3,7 @@
{ const imagePlaceHolder = " "; return paragraph.replaceAll(imgPattern, imagePlaceHolder).length; }; +const wordCounts = computed(() => { + return Array.from(props.contents, content => calculateWordCount(content)); +}); +