From 192ee28fce1a2dc0866a815f26d690659bb09104 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Wed, 24 Sep 2025 15:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84bind(this)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/home/src/main/ets/view/HomeContent.ets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/home/src/main/ets/view/HomeContent.ets b/features/home/src/main/ets/view/HomeContent.ets index 5298fa7..b7cfa37 100644 --- a/features/home/src/main/ets/view/HomeContent.ets +++ b/features/home/src/main/ets/view/HomeContent.ets @@ -59,7 +59,9 @@ export struct HomeContent { { icon: $r('app.media.comment'), count: HomeConstants.OPERATE_BUTTON_COUNTS[1], - onClick: this.onCommentButtonClick.bind(this) + onClick: (event: ClickEvent) => { + this.onCommentButtonClick(event); + } }, { icon: $r('app.media.share'), -- Gitee