Skip to content

jardenliu/wujie-polyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3d8b447 · Feb 25, 2025

History

92 Commits
Jan 30, 2023
Jan 18, 2023
Dec 27, 2023
Nov 8, 2024
Jan 6, 2025
Feb 25, 2025
Dec 1, 2022
Nov 27, 2022
Nov 30, 2022
Nov 30, 2022
Jan 29, 2023
Oct 15, 2024
Jan 18, 2023
Nov 30, 2022
Nov 30, 2022
Nov 30, 2022
Aug 21, 2023
Jan 6, 2025
Jan 29, 2023
Nov 30, 2022
Nov 30, 2022

Repository files navigation

logo

wujie-polyfill

由于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>

STAR HISTORY