Quellcode durchsuchen

feat(basic): 更新基础库版本至 1.0.5- 在 AddGrantDoctorView 中添加医生选择功能
- 在 GrantRelationshipView 中添加 keyGenerator 函数- 更新 ToolsHelper 中的 getUniqueId 方法
- 修改 BuildProfile 中的 HAR_VERSION
- 更新相关 README 和 oh-package-lock 文件

徐勤民 vor 5 Monaten
Ursprung
Commit
7e68e4eae4
3 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
  1. 1 1
      BuildProfile.ets
  2. 4 1
      README.md
  3. 2 1
      src/main/ets/utils/ToolsHelper.ets

+ 1 - 1
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';

+ 4 - 1
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()
         },

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