@cc-component/cc-core 1.7.3 → 1.7.4
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.
|
@@ -33,7 +33,7 @@ export class LayerUI {
|
|
|
33
33
|
|
|
34
34
|
loading_call: { open: (finish: () => void) => void, close: () => void }
|
|
35
35
|
progess: { open: (param: ISceneParam, finish: () => void) => void, close: (param: ISceneParam) => void, progess: (param: ISceneParam, progress: number, time?: number) => void }
|
|
36
|
-
window: { willOpen: (comp: IBundleConfig) => void, open: (comp: IBundleConfig) => void, willClose: (comp: IBundleConfig) => void, close: (comp: IBundleConfig) => void }
|
|
36
|
+
window: { willOpen: (comp: IBundleConfig, param: any) => void, open: (comp: IBundleConfig) => void, willClose: (comp: IBundleConfig) => void, close: (comp: IBundleConfig) => void }
|
|
37
37
|
scene: ISceneParam
|
|
38
38
|
launch: BaseLaunchComponent;
|
|
39
39
|
|
|
@@ -217,19 +217,10 @@ export class App {
|
|
|
217
217
|
Logger.warn("重复打开窗口-请检查", config.path)
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
if (!param) { param = {} }
|
|
221
|
+
App.gui.window?.willOpen?.(config, param)
|
|
221
222
|
//console.error('打开:', Array.from(App.Instance.openedWindows.keys()), config.path);
|
|
222
223
|
App.OpenBlockEvents(LayerType.LayerBlockEventsUI, true)
|
|
223
|
-
if (!param) {
|
|
224
|
-
param = {}
|
|
225
|
-
}
|
|
226
|
-
//界面回调方法
|
|
227
|
-
const call = param?.callBack;
|
|
228
|
-
const backCallback = (arg1: any, arg2: any) => {
|
|
229
|
-
call?.(arg1, arg2)
|
|
230
|
-
}
|
|
231
|
-
if (param instanceof Object)
|
|
232
|
-
param.callBack = backCallback;
|
|
233
224
|
|
|
234
225
|
const view = await App.LoadWindow<T>(config, param);
|
|
235
226
|
|
|
@@ -57,7 +57,7 @@ declare global {
|
|
|
57
57
|
/**监听:是否打开网络接口重连窗口 -open 回调方法需要执行 finish() 方法 */
|
|
58
58
|
function OnRequstNet(param: { open: (finish: (isOk: boolean) => void) => void })
|
|
59
59
|
/**监听窗口打开关闭 */
|
|
60
|
-
function OnWindow(param: { willOpen: (comp: IBundleConfig) => void, open: (comp: IBundleConfig) => void, willClose: (comp: IBundleConfig) => void, close: (comp: IBundleConfig) => void });
|
|
60
|
+
function OnWindow(param: { willOpen: (comp: IBundleConfig, param: any) => void, open: (comp: IBundleConfig) => void, willClose: (comp: IBundleConfig) => void, close: (comp: IBundleConfig) => void });
|
|
61
61
|
/**=====================================✅✅Http请求======================= */
|
|
62
62
|
/**网络接口 */
|
|
63
63
|
function Requst<T>(config: IHttpConfig, params?: any, ext?: { is_show_alert?: boolean }): Promise<{ code: number, data: T, msg: string }>;
|