@kkarum/framework 2.3.17 → 2.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/FW.d.ts CHANGED
@@ -96,7 +96,7 @@ declare namespace FW {
96
96
  * @param bundleName - bundle名称
97
97
  * @param forceRelease - 是否强制释放当前包资源
98
98
  */
99
- launchScene(bundleName: string,forceRelease?:boolean): void;
99
+ launchScene(bundleName: string, forceRelease?: boolean): void;
100
100
 
101
101
  /**
102
102
  * 注册框架组件
@@ -314,7 +314,7 @@ declare namespace FW {
314
314
  getEnableObjectMap();
315
315
  getDisableObjectMap();
316
316
  getAllObjectMap();
317
- isEmpty():boolean;
317
+ isEmpty(): boolean;
318
318
  findObjectProperty(node: cc.Node);
319
319
  findObjectProperty(component: FW.Object);
320
320
  findObjectProperty(uniqueId: number);
@@ -359,7 +359,7 @@ declare namespace FW {
359
359
  */
360
360
  getSocketMap(): Map<string, Socket>;
361
361
  /** 关闭所有Socket连接 */
362
- closeAll():void;
362
+ closeAll(): void;
363
363
  /** 暂停消息处理 */
364
364
  pauseMessageHandle(): void;
365
365
  /** 恢复消息处理 */
@@ -901,9 +901,9 @@ declare namespace FW {
901
901
  /** 清理方法 */
902
902
  clear(): void;
903
903
  /** 开启调试 */
904
- openDebug():void;
904
+ openDebug(): void;
905
905
  /** 是否开启调试 */
906
- isDebug():boolean;
906
+ isDebug(): boolean;
907
907
 
908
908
  /**
909
909
  * 异步打开layer
@@ -1016,8 +1016,8 @@ declare namespace FW {
1016
1016
  };
1017
1017
 
1018
1018
  type ResRejectHandlerListener = {
1019
- loadResHandler:(err: Error | null, asset: AssetProperty | string | null) => void;
1020
- loadBundleHandler:(err: Error | null, bundle: string | null) => void;
1019
+ loadResHandler: (err: Error | null, asset: AssetProperty | string | null) => void;
1020
+ loadBundleHandler: (err: Error | null, bundle: string | null) => void;
1021
1021
  }
1022
1022
  /**
1023
1023
  * 资源管理器 - 负责游戏资源的加载、获取和释放等操作
@@ -1080,7 +1080,7 @@ declare namespace FW {
1080
1080
  ext?: string;
1081
1081
  enableCache?: boolean;
1082
1082
  maxRetryCount?: number;
1083
- texture?:boolean;
1083
+ texture?: boolean;
1084
1084
  cb?: (asset: T) => void;
1085
1085
  },): Promise<T>;
1086
1086
 
@@ -1886,7 +1886,7 @@ declare namespace FW {
1886
1886
  /**
1887
1887
  * 状态构造类
1888
1888
  */
1889
- stateConstructor: { new (): T };
1889
+ stateConstructor: { new(): T };
1890
1890
  };
1891
1891
 
1892
1892
  /**
@@ -2060,11 +2060,11 @@ declare namespace FW {
2060
2060
  };
2061
2061
 
2062
2062
 
2063
- type VirtualScrollViewListener =
2064
- {
2065
- onRender(element:ObjectProperty,index: number,...args:any);
2066
- onTouchElement(element:ObjectProperty,index: number,...args:any);
2067
- }
2063
+ type VirtualScrollViewListener =
2064
+ {
2065
+ onRender(element: ObjectProperty, index: number, ...args: any);
2066
+ onTouchElement(element: ObjectProperty, index: number, ...args: any);
2067
+ }
2068
2068
 
2069
2069
  type VirtualScrollViewConfig = {
2070
2070
  /**
@@ -2079,7 +2079,7 @@ declare namespace FW {
2079
2079
  /**
2080
2080
  * 列表容器
2081
2081
  */
2082
- container:cc.Node;
2082
+ container: cc.Node;
2083
2083
  }
2084
2084
 
2085
2085
 
@@ -2491,7 +2491,7 @@ declare namespace FW {
2491
2491
  static SUB_LOGIC = 5;
2492
2492
  }
2493
2493
 
2494
- export class FWVirtualScrollViewDirection{
2494
+ export class FWVirtualScrollViewDirection {
2495
2495
  static VERTICAL = 0;
2496
2496
  static HORIZONTAL = 1;
2497
2497
  }
@@ -2949,8 +2949,8 @@ declare namespace FW {
2949
2949
  * http服务
2950
2950
  */
2951
2951
  export class Http extends Service {
2952
- public initialize() {}
2953
- public onDestroy(): void {}
2952
+ public initialize() { }
2953
+ public onDestroy(): void { }
2954
2954
  /**
2955
2955
  * get请求
2956
2956
  * @param url
@@ -2977,6 +2977,20 @@ declare namespace FW {
2977
2977
  cb?: (response: string) => void,
2978
2978
  tag?: string,
2979
2979
  ): Promise<string>;
2980
+ /**
2981
+ * post请求
2982
+ * @param url
2983
+ * @param params
2984
+ * @param cb
2985
+ * @param tag
2986
+ */
2987
+ async postApiMessage(
2988
+ url: string,
2989
+ params?: string,
2990
+ headers?: string,
2991
+ cb?: (response: string) => void,
2992
+ tag?: string,
2993
+ ): Promise<string>;
2980
2994
  /**
2981
2995
  * 请求错误
2982
2996
  * @param err