x-remote-component

    1.0.5 • Public • Published

    x-remote-component

    远程组件加载

    demo

      <RemoteComponent url='http://localhost:7001/public/upload/x-seed.js' moduleName='Seed'/>
    

    或者自己实现请求代码返回

    const request=()=>{
        return new Promise(resolve=>{
          window.eval(js)
          resolve(
            Seed
          )
        });
      }
     <RemoteComponent request={request}/>
    

    或者直接传入js代码和css代码

    <RemoteComponent js={js} css='body{background:#ccc}' moduleName = 'Seed'/>
    

    npm安装

    npm install --save x-remote-component
    

    关于作者

    https://github.com/tianxiangbing

    Install

    npm i x-remote-component

    DownloadsWeekly Downloads

    2

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    47.1 kB

    Total Files

    37

    Last publish

    Collaborators

    • tianxiangbing