@xingtukeji/micro 1.0.10 → 1.1.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/dist/index.js +167 -1961
- package/dist/types/parent.d.ts +3 -1
- package/dist/types/types.d.ts +3 -0
- package/package.json +1 -8
package/dist/types/parent.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare class MicroApp {
|
|
|
4
4
|
app: App | AppOption;
|
|
5
5
|
dom: HTMLIFrameElement | undefined;
|
|
6
6
|
panel: HTMLElement | undefined;
|
|
7
|
+
loading: HTMLElement | undefined;
|
|
8
|
+
loadingTimer: NodeJS.Timeout | undefined;
|
|
7
9
|
constructor(app: AppOption);
|
|
8
10
|
mount(el: HTMLElement | string | undefined, isHide?: boolean): void;
|
|
9
11
|
unmount(): void;
|
|
@@ -21,7 +23,7 @@ export declare class MicroApp {
|
|
|
21
23
|
changeOptions(options: Partial<AppOption>): void;
|
|
22
24
|
onLoad(_event: Event): void;
|
|
23
25
|
onUnload(_event: Event): void;
|
|
24
|
-
onError(): void;
|
|
26
|
+
onError(_event: Event): void;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* 初始化主应用微前端
|
package/dist/types/types.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export interface AppOption {
|
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
};
|
|
12
12
|
sync?: boolean;
|
|
13
|
+
onLoad?: (event: Event, app: MicroApp) => void;
|
|
14
|
+
onUnload?: (event: Event, app: MicroApp) => void;
|
|
15
|
+
onError?: (event: Event, app: MicroApp) => void;
|
|
13
16
|
}
|
|
14
17
|
export interface App extends AppOption {
|
|
15
18
|
instance: MicroApp;
|
package/package.json
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingtukeji/micro",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"development": "./src/index.js",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./package.json": "./package.json"
|
|
14
|
-
},
|
|
15
8
|
"author": "",
|
|
16
9
|
"license": "ISC",
|
|
17
10
|
"publishConfig": {
|