@ives_xxz/framework 1.6.0 → 1.6.2
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/FW.d.ts
CHANGED
|
@@ -126,7 +126,7 @@ export abstract class FWLayerController
|
|
|
126
126
|
eventName: eventName || cc.Node.EventType.TOUCH_END,
|
|
127
127
|
cb: cb,
|
|
128
128
|
target: target,
|
|
129
|
-
responseInterval: responseInterval,
|
|
129
|
+
responseInterval: responseInterval || this.defaultResponseInterval,
|
|
130
130
|
},
|
|
131
131
|
],
|
|
132
132
|
});
|
|
@@ -146,7 +146,7 @@ export abstract class FWLayerController
|
|
|
146
146
|
{
|
|
147
147
|
eventName: eventName,
|
|
148
148
|
cb: cb,
|
|
149
|
-
responseInterval: responseInterval
|
|
149
|
+
responseInterval: responseInterval || this.defaultResponseInterval,
|
|
150
150
|
},
|
|
151
151
|
],
|
|
152
152
|
});
|
package/expand/FWDecorator.ts
CHANGED
|
@@ -336,10 +336,15 @@ export function AutoRegisterCCEvent(nodePath: string, eventName?: string) {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
if (targetNode) {
|
|
339
|
-
this.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
339
|
+
this.registerEvent({
|
|
340
|
+
CCEvent: [
|
|
341
|
+
{
|
|
342
|
+
eventName: evt,
|
|
343
|
+
cb: originalMethod.bind(this),
|
|
344
|
+
target: targetNode,
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
});
|
|
343
348
|
FWLog.debug(`自动注册事件: ${nodePath} -> ${propertyKey}`);
|
|
344
349
|
} else {
|
|
345
350
|
FWLog.warn(`自动注册事件失败: 未找到节点 ${nodePath}`);
|
|
@@ -359,10 +364,15 @@ export function AutoRegisterFWEvent(eventName: any) {
|
|
|
359
364
|
|
|
360
365
|
target.onInit = function (...args) {
|
|
361
366
|
originalOnInit?.call(this, args);
|
|
362
|
-
this.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
367
|
+
this.registerEvent({
|
|
368
|
+
CCEvent: [
|
|
369
|
+
{
|
|
370
|
+
eventName: eventName,
|
|
371
|
+
cb: originalMethod.bind(this),
|
|
372
|
+
target: this,
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
});
|
|
366
376
|
};
|
|
367
377
|
};
|
|
368
378
|
}
|
package/language/FWLanguage.ts
CHANGED
|
@@ -38,14 +38,17 @@ export default abstract class FWLanguage extends cc.Component {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
protected onLoad(): void {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
this.registerEvent({
|
|
42
|
+
FWEvent: [
|
|
43
|
+
{
|
|
44
|
+
eventName: FWEventDefine.LanguageEvent.LANGUAGE_CHANGE,
|
|
45
|
+
cb: () => {
|
|
44
46
|
this._language = FW.Entry.languageMgr.getLanguageIndex();
|
|
45
47
|
this.onLanguageChange();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
});
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
protected onEnable(): void {
|
|
@@ -61,6 +61,7 @@ export default class FWPromiseManager
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const onAbort = () => {
|
|
64
|
+
FWLog.debug("promise abort");
|
|
64
65
|
timerSchedule?.unSchedule();
|
|
65
66
|
if (promiseProxy.status === FWSystemDefine.FWPromiseStatus.PENDING) {
|
|
66
67
|
promiseProxy.status = FWSystemDefine.FWPromiseStatus.CANCELLED;
|
package/package.json
CHANGED
package/service/http/FWHttp.ts
CHANGED
|
@@ -77,7 +77,9 @@ export default class FWHttp extends FWService {
|
|
|
77
77
|
...FWSystemConfig.PromiseConfig.http,
|
|
78
78
|
retryCondition(error, retryCount) {
|
|
79
79
|
return (
|
|
80
|
-
|
|
80
|
+
error ||
|
|
81
|
+
xhr.readyState != 4 ||
|
|
82
|
+
(xhr.status !== 200 && retryCount < 3)
|
|
81
83
|
);
|
|
82
84
|
},
|
|
83
85
|
}
|