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()); }