weboot-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

WEBOOT - 使用IFrame + Nginx方案的微前端框架。 iframe 子应用 须在main.ts内调用 setupApplication()方法初始化应用

import { setupApplication, IApplicationEvents, MessageEvent, SharedChangeEvent } from 'weboot-plugin'

const _options: IApplicationEvents = {
  onMount: () => {
    console.warn('应用挂载');
  },
  onUnMount() {
    console.warn('应用卸载');
  },
  onMessage(args: MessageEvent<any>) {
    console.warn('应用消息', args);
  },
  onSharedChange(args: SharedChangeEvent) {
    console.warn('数据共享', args);
  },
  onDestroy() {
    console.warn('应用注销');
  },
}

setupApplication(_options);

// boot web app

Readme

Keywords

none

Package Sidebar

Install

npm i weboot-plugin

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

18 kB

Total Files

5

Last publish

Collaborators

  • vblegend