Ti-FlowChart 0.3.0
满足移动端项目的需求,可实现在移动端进行可视化的触摸屏交互。
实现步骤: 安装, 引用,配置
安装:npm install ti-flowchart,yarn add ti-flowchart
引用:import 'ti-flowchart/lib/ti-flowchart.umd.js';
配置:实例化,注册容器,注册组件,调用能力
实例化:
const tui = new window.tuiFlowChart()
注册容器:
const box = document.getElementById("容器编号ID");
tui.setDragBox(box);
注册组件:
const dom= document.getElementById("组件编号ID");
tui.addDragItem(dom);
调用能力:
tui.options() 配置 能力参数
tui.clear() 清理 画布
tui.getBodyElement() 返回 容器Dom
tui.zoomOut() 缩小 容器内的元素Dom
tui.zoomIn() 放大 容器内的元素Dom
tui.getZoomValue() 返回 缩放比例
tui.getData() 返回 容器内的元素数据
tui.load() 导入 元素数据
tui.getCurItemObject() 返回 容器内选中的元素Dom
tui.setDragBox() 配置 容器Dom
tui.addDragItem() 注册 元素组件
Ti-FlowChart 并非单例模式, 页面里可以实例化多个tuiFlowChart
Ti-FlowChart 适合二次开发,提供可视化工作流需求开发能力,灵活性,兼容PC/手机.
Ti-FlowChart 好用易上手
帮助项目:
gitee.com/Timtance/ti-element-vue-test
github.com/Timtance/ti-element-vue-test
gitee.com/Timtance/ti-flowchart-test
github.com/Timtance/ti-flowchart-test