From 4486bad4e070ffbc2c6d4540e77592f9dcc24927 Mon Sep 17 00:00:00 2001 From: Yeahyeah Date: Wed, 18 Jun 2025 09:48:22 +0000 Subject: [PATCH] update entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets. Deprecated interfaces Signed-off-by: Yeahyeah --- entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets b/entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets index 09b3efd..53d8b97 100644 --- a/entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets +++ b/entry/src/main/ets/view/longlist/WaterFlowDescriptionView.ets @@ -26,7 +26,6 @@ export struct WaterFlowDescriptionView { @Link type: string; @Link collectionsCount: number; @Link vipSign: string; - private numberFormat: intl.NumberFormat = new intl.NumberFormat('collectionsCount', { maximumFractionDigits: 1 }); build() { Column() { @@ -78,8 +77,7 @@ export struct WaterFlowDescriptionView { }); } - Text(this.collectionsCount < 1000 ? this.collectionsCount + '' : - this.numberFormat.format(this.collectionsCount / 1000) + 'k') + Text(JSON.stringify((this.collectionsCount/1000).toFixed(1)).replace(/"/g, "") + 'k') .fontSize($r('app.float.font_size_12')) .fontFamily($r('sys.string.ohos_id_text_font_family_regular')) .fontColor(Color.Black) -- Gitee