@cc-component/cc-ex-component 1.7.8 → 1.8.0
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/assets/core/ViewModel.ts
CHANGED
|
@@ -294,6 +294,7 @@ export function ViewModel<T extends new (...args: any[]) => Component>(Base: T)
|
|
|
294
294
|
|
|
295
295
|
protected onLoad(): void {
|
|
296
296
|
super.onLoad()
|
|
297
|
+
this.onTouch()
|
|
297
298
|
this.managerData()
|
|
298
299
|
}
|
|
299
300
|
// 在 withDataBinding 返回的 class 中
|
|
@@ -309,11 +310,11 @@ export function ViewModel<T extends new (...args: any[]) => Component>(Base: T)
|
|
|
309
310
|
|
|
310
311
|
|
|
311
312
|
protected onEnable(): void {
|
|
312
|
-
|
|
313
|
+
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
protected onDisable(): void {
|
|
316
|
-
this.offTouch()
|
|
317
|
+
// this.offTouch()
|
|
317
318
|
}
|
|
318
319
|
|
|
319
320
|
refreshData(key: string, value: any) {
|
package/assets/ex/ExCommon.ts
CHANGED
|
@@ -801,7 +801,7 @@ const originalOnTouchEnded = Button.prototype["_onTouchEnded"];
|
|
|
801
801
|
Button.prototype["_onTouchEnded"] = function (event: EventTouch) {
|
|
802
802
|
// 播放点击音效
|
|
803
803
|
ExComponentModule.Emit(this);
|
|
804
|
-
this.node.emit('click', this)
|
|
804
|
+
// this.node.emit('click', this)
|
|
805
805
|
// 调用原始逻辑
|
|
806
806
|
// EventHandler.emitEvents(this.clickEvents, event);
|
|
807
807
|
return originalOnTouchEnded.call(this, event);
|