From 29643f126e4ddb9b414e95a97234737447dbc663 Mon Sep 17 00:00:00 2001 From: pqcqaq <905739777@qq.com> Date: Sat, 19 Oct 2024 09:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89categoryId?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E5=B0=B1=E4=B8=8D=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/frontend/home/essays/byLabel/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/frontend/home/essays/byLabel/index.ts b/src/components/frontend/home/essays/byLabel/index.ts index 400a882..6ad2a02 100644 --- a/src/components/frontend/home/essays/byLabel/index.ts +++ b/src/components/frontend/home/essays/byLabel/index.ts @@ -43,7 +43,9 @@ export default OakComponent({ }; }) // 只能在这里做筛选,不知道有没有更好的做法 - .filter((item) => item.categoryId === categoryId), + .filter( + (item) => !categoryId || item.categoryId === categoryId + ), }; }, });