From 7e68e4eae4a799fd88f10bc9dad993e20dfdb15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Mon, 28 Oct 2024 14:03:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(basic):=20=E6=9B=B4=E6=96=B0=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E5=BA=93=E7=89=88=E6=9C=AC=E8=87=B3=201.0.5-=20?= =?UTF-8?q?=E5=9C=A8=20AddGrantDoctorView=20=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD=20-=20?= =?UTF-8?q?=E5=9C=A8=20GrantRelationshipView=20=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20keyGenerator=20=E5=87=BD=E6=95=B0-=20=E6=9B=B4=E6=96=B0=20To?= =?UTF-8?q?olsHelper=20=E4=B8=AD=E7=9A=84=20getUniqueId=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20-=20=E4=BF=AE=E6=94=B9=20BuildProfile=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=20HAR=5FVERSION=20-=20=E6=9B=B4=E6=96=B0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=20README=20=E5=92=8C=20oh-package-lock=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BuildProfile.ets | 2 +- README.md | 5 ++++- src/main/ets/utils/ToolsHelper.ets | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BuildProfile.ets b/BuildProfile.ets index 92a9611..9ae474e 100644 --- a/BuildProfile.ets +++ b/BuildProfile.ets @@ -1,7 +1,7 @@ /** * Use these variables when you tailor your ArkTS code. They must be of the const type. */ -export const HAR_VERSION = '1.0.4'; +export const HAR_VERSION = '1.0.5'; export const BUILD_MODE_NAME = 'debug'; export const DEBUG = true; export const TARGET_NAME = 'default'; diff --git a/README.md b/README.md index d05d02f..81c77df 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,10 @@ build() { }, pageSize: 10, data: this.list ?? [], - customBuilderParam: this.buildItem, + // 这里要用箭头函数,否则buildItem里面的this指向不对 + customBuilderParam: (item: Item, index: number) => { + this.buildItem(item, index) + }, onRefresh: () => { this.refresh() }, diff --git a/src/main/ets/utils/ToolsHelper.ets b/src/main/ets/utils/ToolsHelper.ets index 7793d3d..a6c0444 100644 --- a/src/main/ets/utils/ToolsHelper.ets +++ b/src/main/ets/utils/ToolsHelper.ets @@ -348,7 +348,8 @@ export class ToolsHelper { }); } - static getUniqueId(fun: Function): string { + private static getUniqueId(fun: Function): string { + ToolsHelper.log(ToolsHelper.getStackKey()) if (!ToolsHelper.uniqueIdMap.has(fun)) { ToolsHelper.uniqueIdMap.set(fun, ToolsHelper.getUuid()); }