由于wujie(无界)采用的是WebComponents + iframe 来是脚本沙箱和样式隔离,该仓库用于弥补该方案的在特定的场景下的不足。
文档详见:文档
- LocationSyncPlugin (地址同步插件)
- LocationReloadPlugin (页面刷新插件)
- EventTargetPlugin (事件目标插件)
- WindowGetterPlugin (window获取插件)
- WindowMessagePlugin (window通信插件)
- DocFullscreenPlugin (全屏插件)
- InstanceofPlugin (原型链判定插件)
- DocElementRectPlugin(代理documentElement主应用尺寸插件)
- 安装
npm i wujie-polyfill -S
- 使用
import { startApp } from 'wujie'
import { LocationReloadPlugin } from "wujie-polyfill";
// javascript
setupApp({
name: '唯一id',
url: '子应用地址',
exec: true,
el: '容器',
sync: true
plugins: [LocationReloadPlugin()]
})
// vue
<WujieVue
width="100%"
height="100%"
name="xxx"
:url="xxx"
:plugins="[LocationReloadPlugin()]"
></WujieVue>
// react
<WujieReact
width="100%"
height="100%"
name="xxx"
url="{xxx}"
plugins="{[LocationReloadPlugin()]}"
></WujieReact>