x-remote-component
v1.0.5
Published
react remote component 远程加载组件
Downloads
5
Maintainers
Readme
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