suanpan-web-renderer

0.2.14 • Public • Published

算盘渲染器

用于渲染算盘页面

更新内容详见 Release Notes 或者 Github Release

API 列表

组件 参数: 类型 说明
Graph domain 算盘服务域名/IP 地址
appId 待渲染的算盘项目 id
token 用于访问算盘后台接口的 token
isInsightEdit 是否为insight编辑页面 true为编辑页 false为详情页
onChange 当算盘项目数据变更后,触发回调,入参为 DataSystem 类型的组件列表
onBeforeRun 运行算盘项目前,触发的回调。返回值为布尔类型,如果返回false,则不会运行算盘项目
Map url 地图组件数据的地址

示例

加载算盘项目页面

import { Graph, Map } from 'suanpan-web-renderer';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<React.StrictMode>
  <div style={{width: '50%', height: '50%'}}>
    <Graph domain={"https://www.xuelangyun.com"} appId={3109} token={'some_token'} isInsightEdit={true}/>
  </div>
  <div style={{width: '50%', height: '50%'}}>
    <Map url={'some_url'}/>
  </div>
</React.StrictMode>);

Readme

Keywords

none

Package Sidebar

Install

npm i suanpan-web-renderer

Weekly Downloads

1

Version

0.2.14

License

none

Unpacked Size

1.03 MB

Total Files

10

Last publish

Collaborators

  • sheldonwr
  • yiming(wushuang)