@kkarum/framework 2.3.20 → 2.3.21

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.
@@ -55,9 +55,9 @@ assets/<bundle>/
55
55
  config/<Bundle>AssetConfig.ts
56
56
  data/<Bundle>Data.ts
57
57
  logic/<Bundle>Logic.ts
58
- registry/<Bundle>Registry.ts
59
- ui/<Feature>/<Feature>LayerController.ts
60
- prefab/<Feature>Layer.prefab
58
+ <Bundle>Registry.ts
59
+ controller/<Feature>/<Feature>LayerController.ts
60
+ res/layer/<Feature>Layer.prefab
61
61
  ```
62
62
 
63
63
  注册类示例:
@@ -181,7 +181,9 @@ export class ShopLayerController extends FW.LayerController {
181
181
  isRepeatOpen = false;
182
182
 
183
183
  get layerAssetProperty(): FW.AssetProperty {
184
- return this.getConfig<ShopAssetConfig>().preLoad.prefab["ShopLayer"] as FW.AssetProperty;
184
+ return this.getConfig<ShopAssetConfig>().preLoad.prefab[
185
+ "ShopLayer"
186
+ ] as FW.AssetProperty;
185
187
  }
186
188
 
187
189
  onInit(args?: { tab?: string }) {
@@ -238,17 +240,21 @@ this.fw("SHOP_GOODS_CHANGED", this.renderGoods);
238
240
 
239
241
  ```ts
240
242
  this.registerEvent({
241
- CCEvent: [{
242
- target: buyButton,
243
- eventName: cc.Node.EventType.TOUCH_END,
244
- responseInterval: 500,
245
- cb: this.onBuyClick,
246
- }],
247
- FWEvent: [{
248
- eventName: "SHOP_REFRESH",
249
- responseInterval: 200,
250
- cb: this.onRefresh,
251
- }],
243
+ CCEvent: [
244
+ {
245
+ target: buyButton,
246
+ eventName: cc.Node.EventType.TOUCH_END,
247
+ responseInterval: 500,
248
+ cb: this.onBuyClick,
249
+ },
250
+ ],
251
+ FWEvent: [
252
+ {
253
+ eventName: "SHOP_REFRESH",
254
+ responseInterval: 200,
255
+ cb: this.onRefresh,
256
+ },
257
+ ],
252
258
  });
253
259
  ```
254
260
 
@@ -257,9 +263,13 @@ this.registerEvent({
257
263
  ## 定时器
258
264
 
259
265
  ```ts
260
- const schedule = FW.Entry.timeMgr.scheduleOnce(() => {
261
- this.refreshGoods();
262
- }, 1, this);
266
+ const schedule = FW.Entry.timeMgr.scheduleOnce(
267
+ () => {
268
+ this.refreshGoods();
269
+ },
270
+ 1,
271
+ this,
272
+ );
263
273
 
264
274
  FW.Entry.timeMgr.schedule(
265
275
  () => this.tick(),
@@ -277,16 +287,19 @@ FW.Entry.timeMgr.unSchedule(this);
277
287
  ## Promise
278
288
 
279
289
  ```ts
280
- const proxy = FW.Entry.promiseMgr.execute<string>((resolve, reject, signal) => {
281
- // 异步操作
282
- signal.addEventListener("abort", () => {
283
- // 清理
284
- });
285
- }, {
286
- timeout: 10000,
287
- retryCount: 3,
288
- retryInterval: 2,
289
- });
290
+ const proxy = FW.Entry.promiseMgr.execute<string>(
291
+ (resolve, reject, signal) => {
292
+ // 异步操作
293
+ signal.addEventListener("abort", () => {
294
+ // 清理
295
+ });
296
+ },
297
+ {
298
+ timeout: 10000,
299
+ retryCount: 3,
300
+ retryInterval: 2,
301
+ },
302
+ );
290
303
 
291
304
  const result = await proxy.promise;
292
305
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kkarum/framework",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": [