@ives_xxz/framework 1.3.6 → 1.3.8

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
@@ -113,7 +113,7 @@ declare namespace FW {
113
113
  /** 获取协议Key值 */
114
114
  getProtocolKey?(msg: any): string;
115
115
  /** 消息收到前回调函数 */
116
- onBeforeReceivingMessage?(msg: any): Promise<object>;
116
+ onBeforeReceivingMessage?(msg: any): Promise<SocketMessage>;
117
117
  };
118
118
 
119
119
  type ObjectManager = {
@@ -169,6 +169,11 @@ declare namespace FW {
169
169
  onDestroy();
170
170
  };
171
171
 
172
+ type SocketMessage = {
173
+ data:any;
174
+ error:boolean;
175
+ }
176
+
172
177
  type SocketManager = {
173
178
  createSocket(
174
179
  tag: string,
@@ -1174,6 +1179,11 @@ declare namespace FW {
1174
1179
  unRegister(stateType: number, stateMachineName?: string);
1175
1180
  };
1176
1181
 
1182
+ type SocketMessage = {
1183
+ data:any;
1184
+ error:boolean;
1185
+ }
1186
+
1177
1187
  type AnimationManager = {
1178
1188
  initialize(): void;
1179
1189
  onDestroy(): void;
package/entry/FWEntry.ts CHANGED
@@ -146,6 +146,11 @@ export default class FWEntry implements FW.Entry {
146
146
 
147
147
  releaseBundle(bundleName: string) {
148
148
  this.resMgr.releaseBundle(bundleName);
149
+ const depend = this.getDepend(bundleName);
150
+ for(const d of depend){
151
+ this.resMgr.releaseBundle(d);
152
+ this.evtMgr.dispatch(`${FWEventDefine.SystemEvent.BUNDLE_RELEASE}-${d}`);
153
+ }
149
154
  this.evtMgr.dispatch(`${FWEventDefine.SystemEvent.BUNDLE_RELEASE}-${bundleName}`);
150
155
  }
151
156
 
@@ -59,9 +59,9 @@ export default class FWRollingViewNesting extends cc.Component {
59
59
  let touch = event.touch;
60
60
  if (viewGroup.content) {
61
61
  if (viewGroup instanceof cc.PageView) {
62
- } else {
63
- viewGroup._handleReleaseLogic(touch);
62
+ viewGroup['_touchEndPosition'] = touch.getLocation();
64
63
  }
64
+ viewGroup._handleReleaseLogic(touch);
65
65
  }
66
66
  }
67
67
  if (
@@ -72,9 +72,9 @@ export default class FWRollingViewNesting extends cc.Component {
72
72
  let touch = event.touch;
73
73
  if (viewGroup.content) {
74
74
  if (viewGroup instanceof cc.PageView) {
75
- } else {
76
- viewGroup._handleReleaseLogic(touch);
75
+ viewGroup['_touchEndPosition'] = touch.getLocation();
77
76
  }
77
+ viewGroup._handleReleaseLogic(touch);
78
78
  }
79
79
  }
80
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": ["123456"],
@@ -310,12 +310,17 @@ export default class FWSocket implements FW.Socket {
310
310
  /** 消息处理 */
311
311
  private async onSocketMessage(originalMsg: any) {
312
312
  const msg = await this.handle.onBeforeReceivingMessage(originalMsg);
313
+
314
+ if(msg.error){
315
+ this.remoteProtocol(msg);
316
+ return;
317
+ }
313
318
 
314
319
  if (await this.handle?.onHeart?.(msg)) {
315
320
  this.receiveTimeStamp = new Date().getTime();
316
321
  return;
317
322
  }
318
-
323
+
319
324
  this.remoteProtocol(msg);
320
325
 
321
326
  if (this.isPausedMessageHandle) return;
@@ -15,5 +15,5 @@ export default abstract class FWSocketHandle implements FW.SocketHandle {
15
15
  onError?(msg: any): void;
16
16
  onTimeout?(): void;
17
17
  getProtocolKey?(msg: any): string;
18
- onBeforeReceivingMessage?(msg: any): Promise<object>;
18
+ onBeforeReceivingMessage?(msg: any): Promise<FW.SocketMessage>;
19
19
  }