@das-fed/mframe 0.0.33 → 0.0.35
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/es5.js +4792 -4519
- package/index.d.ts +12 -5
- package/index.js +3910 -3673
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Emitter } from 'mitt';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 获取 bus 通道
|
|
5
|
+
* 对于 mainApp 通道,确保 event 属性始终使用 window.__MFRAME_MAIN_APP_EVENT__ 上的单例
|
|
6
|
+
* 这解决了模块被多次加载时 mitt 实例不一致的问题
|
|
7
|
+
*/
|
|
3
8
|
export declare const bus: <T extends keyof BusChannel>(name: T) => BusChannel[T];
|
|
4
9
|
|
|
5
10
|
declare type BusChannel = ContainerChannelType & MainAppChannelType & MicroAppChannelType;
|
|
@@ -292,7 +297,7 @@ declare const channelItem_2: {
|
|
|
292
297
|
watch: (cb: (newData: {}, oldData: {}) => any, watchKeys?: never[] | undefined) => () => void;
|
|
293
298
|
};
|
|
294
299
|
cors: {
|
|
295
|
-
send: (microAppName: string, key:
|
|
300
|
+
send: (microAppName: string, key: ChildrenListener, data?: any) => Promise<any[]>;
|
|
296
301
|
on: (name: ParentListener, opt1: any, opt2?: any) => {
|
|
297
302
|
cancel: () => void;
|
|
298
303
|
};
|
|
@@ -327,19 +332,19 @@ declare const channelItem_3: {
|
|
|
327
332
|
};
|
|
328
333
|
cors: {
|
|
329
334
|
send: (key: ParentListener_2, data?: any) => Promise<any[]>;
|
|
330
|
-
on: (name:
|
|
335
|
+
on: (name: ChildernListener, opt1?: any, opt2?: any) => {
|
|
331
336
|
cancel: () => void;
|
|
332
337
|
};
|
|
333
|
-
once: (name:
|
|
338
|
+
once: (name: ChildernListener, opt1?: any, opt2?: any) => {
|
|
334
339
|
cancel: () => void;
|
|
335
340
|
};
|
|
336
341
|
};
|
|
337
342
|
event: Emitter<Event_4>;
|
|
338
343
|
};
|
|
339
344
|
|
|
340
|
-
declare type ChildernListener = 'layoutDataChange' | 'syncRouter' | 'customEventFromMain';
|
|
345
|
+
declare type ChildernListener = 'layoutDataChange' | 'syncRouter' | 'customEventFromMain' | 'customEventFromMicro' | 'messageFromParent';
|
|
341
346
|
|
|
342
|
-
declare type
|
|
347
|
+
declare type ChildrenListener = 'layoutDataChange' | 'syncRouter' | 'customEventFromMain' | 'messageFromParent';
|
|
343
348
|
|
|
344
349
|
/**
|
|
345
350
|
* 清除实例的所有 bus 数据
|
|
@@ -697,6 +702,8 @@ export declare interface NestedAppOptions extends Omit<MainAppContainerInitOptio
|
|
|
697
702
|
debug?: boolean;
|
|
698
703
|
/** 是否隔离路由(true: 嵌套实例路由独立,不与浏览器URL同步;false: 路由同步到URL) */
|
|
699
704
|
isolateRouter?: boolean;
|
|
705
|
+
/** 是否隐藏子应用的外框(nav/menu/tab),默认为 true */
|
|
706
|
+
hideChildFrame?: boolean;
|
|
700
707
|
}
|
|
701
708
|
|
|
702
709
|
export declare interface NestedAppResult {
|