@cc-component/cc-ex-component 1.5.5 → 1.5.7
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
|
@@ -15,7 +15,7 @@ export class ExComponentModule {
|
|
|
15
15
|
param: { click: (comp: Button) => void }
|
|
16
16
|
paramSprite: { loadSprite: (param: { bundle: string, path: string }) => Promise<SpriteFrame>, getSprite: (param: { bundle: string, path: string }) => SpriteFrame }
|
|
17
17
|
paramSpine: { loadSpine: (param: { bundle: string, path: string }) => Promise<sp.SkeletonData>, getSpine: (param: { bundle: string, path: string }) => sp.SkeletonData }
|
|
18
|
-
paramUIWindow: { onLoad: (config: any) => void }
|
|
18
|
+
paramUIWindow: { onLoad: (config: any, viewModel: any) => void }
|
|
19
19
|
|
|
20
20
|
ResetBaseWindow: string = "BaseWindow";
|
|
21
21
|
static Init() {
|
|
@@ -31,7 +31,7 @@ export class ExComponentModule {
|
|
|
31
31
|
if (!isGet) ExComponentModule.Ins.ResetBaseWindow = name
|
|
32
32
|
return ExComponentModule.Ins.ResetBaseWindow
|
|
33
33
|
}
|
|
34
|
-
static OnVMManager(param: { onLoad: (config: any) => void }) {
|
|
34
|
+
static OnVMManager(param: { onLoad: (config: any, viewModel: any) => void }) {
|
|
35
35
|
ExComponentModule.Ins.paramUIWindow = param
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -61,8 +61,8 @@ export class ExComponentModule {
|
|
|
61
61
|
return ExComponentModule.Ins.paramSpine?.getSpine?.(param)
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
static EmitUIWindow(
|
|
65
|
-
return ExComponentModule.Ins.paramUIWindow?.onLoad?.
|
|
64
|
+
static EmitUIWindow(param: any, viewModel: any) {
|
|
65
|
+
return ExComponentModule.Ins.paramUIWindow?.onLoad?.(param, viewModel)
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
window.ExComponentModule = ExComponentModule;
|
|
@@ -25,7 +25,7 @@ declare global {
|
|
|
25
25
|
is_load_sub?: boolean,
|
|
26
26
|
/**是否记录-不记录可重复打开窗口 */
|
|
27
27
|
is_record?: boolean,
|
|
28
|
-
}) => void
|
|
28
|
+
}, viewModel: any) => void
|
|
29
29
|
});
|
|
30
30
|
/**组件:内部使用方法 */
|
|
31
31
|
function Emit(btn: Button);
|
|
@@ -34,7 +34,7 @@ declare global {
|
|
|
34
34
|
function EmitGetSprite(param: any): SpriteFrame;
|
|
35
35
|
function EmitLoadSpine(param: any): Promise<sp.SkeletonData>;
|
|
36
36
|
function EmitGetSpine(param: any): sp.SkeletonData;
|
|
37
|
-
function EmitUIWindow(
|
|
37
|
+
function EmitUIWindow(param: {
|
|
38
38
|
module: string,
|
|
39
39
|
layer: string,
|
|
40
40
|
path: string,
|
|
@@ -44,6 +44,6 @@ declare global {
|
|
|
44
44
|
is_load_sub?: boolean,
|
|
45
45
|
/**是否记录-不记录可重复打开窗口 */
|
|
46
46
|
is_record?: boolean,
|
|
47
|
-
});
|
|
47
|
+
}, viewModel: any);
|
|
48
48
|
}
|
|
49
49
|
}
|