0.1.16 • Published 1 month ago
@cainiaofe/sutee-flow v0.1.16
⚙️ 组件使用
- VM 中假如必要资源,如下
<!-- 页面模版需要依赖的资源 -->
<script
crossorigin
src="https://g.alicdn.com/??code/lib/babel-polyfill/7.12.1/polyfill.min.js,code/lib/react/16.8.0/umd/react.production.min.js,code/lib/react-dom/16.8.0/umd/react-dom.production.min.js,code/lib/prop-types/15.8.1/prop-types.min.js"
></script>
<!-- 建议自己部署一个x6 -->
<script defer="defer" src="https://g.alicdn.com/code/lib/antv-x6/1.34.14/x6.min.js"></script>
- build.json 配置
{
"externals": {
"react": "React",
"react-dom": "ReactDOM",
"@alife/cn-ui": "CNUI",
"@cainiaofe/cn-ui": "CNUI",
"@antv/x6": "X6"
}
}
- 如何使用组件
import ReactDOM from 'react-dom';
import React from 'react';
// 菜鸟大包工程ES目录编译问题待修复,先这样绕过问题。
import '@antv/x6-react-shape/dist/x6-react-shape.js';
import { SuTeeFlow } from '@cainiaofe/sutee-flow';
ReactDOM.render(<SuTeeFlow />, document.getElementById('root'));
// flowId & tenantCode 目前是取url上的参数
// 例如 https://suteeflow.cainiao.com/edit?flowId=258&tenantCode=xxx
ReactDOM.render(
<SuTeeFlow
// 该属性先定义,版本0.1.4以上,
nodeInspectorRender={(cell) => {
// cell 是x6对象
return <div>自定义渲染</div>;
}}
headerConfig={{
type: 'simple', // simple | 'normal'; 默认 'normal'
actions: ['check', 'info', 'save'], // actions不配就是 所有按钮都有
}}
bodyStyle={{ height: '800px' }}
/>,
document.getElementById('root'),
);
0.1.16-beta.1
1 month ago
0.1.16
1 month ago
0.1.16-beta.0
1 month ago
0.1.15
3 months ago
0.1.15-beta.0
3 months ago
0.1.14
4 months ago
0.1.13
4 months ago
0.1.13-beta.3
4 months ago
0.1.13-beta.0
4 months ago
0.1.13-beta.1
4 months ago
0.1.12
5 months ago
0.1.11
5 months ago
0.2.0-beta.0
5 months ago
0.1.10
5 months ago
0.1.9
5 months ago
0.1.8
5 months ago
0.1.7
6 months ago
0.1.6
6 months ago
0.1.5
6 months ago
0.1.4
6 months ago
0.1.3
6 months ago
0.1.2
7 months ago
0.1.1
7 months ago
0.1.0
7 months ago
0.0.7
7 months ago
0.0.6
7 months ago
0.0.5
7 months ago
0.0.4
7 months ago
0.0.3
7 months ago
0.0.2
7 months ago
0.0.1
7 months ago