@micro-zoe/micro-app 0.6.0 → 0.6.1

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/README.zh-cn.md CHANGED
@@ -25,7 +25,7 @@
25
25
  </a>
26
26
  </p>
27
27
 
28
- [English](https://github.com/micro-zoe/micro-app)|简体中文|[官网文档](https://micro-zoe.github.io/micro-app/)|[讨论组](https://github.com/micro-zoe/micro-app/discussions)|[Gitter群聊](https://gitter.im/microzoe/micro-app)
28
+ [English](https://github.com/micro-zoe/micro-app)|简体中文|[官网文档](https://micro-zoe.github.io/micro-app/)|[讨论组](https://github.com/micro-zoe/micro-app/discussions)|[聊天室](https://gitter.im/microzoe/micro-app)
29
29
 
30
30
  # 📖简介
31
31
  micro-app是京东零售推出的一款微前端框架,它基于类WebComponent进行渲染,从组件化的思维实现微前端,旨在降低上手难度、提升工作效率。它是目前接入微前端成本最低的框架,并且提供了JS沙箱、样式隔离、元素隔离、预加载、资源地址补全、插件系统、数据通信等一系列完善的功能。
@@ -44,7 +44,7 @@ micro-app与技术栈无关,对前端框架没有限制,任何框架都可
44
44
  yarn add @micro-zoe/micro-app
45
45
  ```
46
46
 
47
- **2、在入口处引入**
47
+ **2、在入口文件引入**
48
48
  ```js
49
49
  // main.js
50
50
  import microApp from '@micro-zoe/micro-app'
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ declare module '@micro-zoe/micro-app' {
8
8
  export { default as preFetch, } from '@micro-zoe/micro-app/prefetch';
9
9
  export { removeDomScope, pureCreateElement, version, } from '@micro-zoe/micro-app/libs/utils';
10
10
  export { EventCenterForMicroApp, } from '@micro-zoe/micro-app/interact';
11
- export { getActiveApps, getAllApps, } from '@micro-zoe/micro-app/create_app';
11
+ export { getActiveApps, getAllApps, unmountApp, unmountAllApps, } from '@micro-zoe/micro-app/create_app';
12
12
  }
13
13
 
14
14
  declare module '@micro-zoe/micro-app/micro_app' {
@@ -340,5 +340,17 @@ declare module '@micro-zoe/micro-app/create_app' {
340
340
  }
341
341
  export function getActiveApps(): string[];
342
342
  export function getAllApps(): string[];
343
+ export interface unmountAppParams {
344
+ destroy?: boolean;
345
+ clearAliveState?: boolean;
346
+ }
347
+ /**
348
+ * unmount app by appname
349
+ * @param appName
350
+ * @param options unmountAppParams
351
+ * @returns Promise<void>
352
+ */
353
+ export function unmountApp(appName: string, options?: unmountAppParams): Promise<void>;
354
+ export function unmountAllApps(options?: unmountAppParams): Promise<void>;
343
355
  }
344
356