Drawio:开源的流程图软件电脑软件网页工具图文处理

savh 2947

简介

Drawio是一款专业的开源跨平台绘图软件,功能强大,支持各种各样的流程图绘制,能代替Visio和亿图图示等软件,随着版本的更新迭代,功能进一步优化提升,可以选择中文,使用起来非常方便。

【功能特点】

1、从模版快速启动

比如,今天你要画个泳道流程图,你可以点击模版,更换内容即可。

有些场景往往会从空白模版启动——因为更有想象力。

2、丰富的组件供你挑选使用

在页面左侧点击:More Shaps,可以从众多组件库里挑选。

还是找不到所需的组件怎么办?

你甚至还可以自己导入所需的组件:

3、文件保存

Draw.io可以保存文件到Dropbox,或者点击Command+s保存到本地,存储为XML文件。下次可以直接从XML文件打开。

【使用说明】

首次打开Draw.io时,请转到“语言”,然后选择“简体中文”。关闭软件后,重新打开是中文界面。

如果需要关联Draw.io项目文件* .drawio和* .vsdx文件,请运行[Draw.ioPortable] .exe以完成设置。

要完全删除绿色版本,请关闭软件,然后再次运行[Draw.ioPortable] .exe以选择“删除”操作,这将完全清除Draw.io桌面版本的所有相关配置和数据


参数配置说明

URL使用时:

配置默认只显示本地和浏览器存储,并且选择浏览器存储

?lang=zh&browser=1&gapi=0&db=0&od=0&tr=0&gh=0&gl=0&storage=device&mode=browser

参数配置说明:

参数取值示例说明
embed            1            必选参数,启用嵌入模式,隐藏顶部菜单栏
ui            min / atlas / dark / sketch            界面主题:min=极简;atlas=轻量白;dark=深色;sketch=手绘
lang            zh / en / ja / …界面语言,简体中文用 zh            
lightbox            1            只读查看器,不显示任何编辑工具
save            0            禁用保存功能(只读)
noSaveBtn            1            隐藏保存按钮
noExitBtn            1            隐藏退出/关闭按钮
spin            1            加载时显示旋转动画
proto            json            启用 postMessage 通信协议,便于父页面与 iframe 交互
url            https://xxx.com/diagram.drawio            直接加载远程图表文件
clibs            https://xxx.com/lib1.xml;https://xxx.com/lib2.xml            加载自定义图形库(多个地址用分号分隔)
libs            general;uml;er            预加载内置图形库,多个用分号分隔
chrome            0            禁用“在 Chrome 应用模式下打开”提示
db            0            禁用浏览器本地存储提示
picker            0            隐藏模板选择器
gapi            0            禁用 Google Drive 相关功能
od            0            禁用 OneDrive 相关功能
tr            0            禁用 Trello 相关功能


配置文件个性化修改:

drawio支持使用浏览器参数配置,详细的配置教程

URL hash参数说明 通过配置可以实现很多个性化的需求

不使用参数传递的方式,可以将如下配置写死到 src\main\webapp\js\PreConfig.js

文件中 如

urlParams['lang'] = 'zh';

配置信息示例:

window.EXPORT_URL = 'REPLACE_WITH_YOUR_IMAGE_SERVER';
window.PLANT_URL = 'REPLACE_WITH_YOUR_PLANTUML_SERVER';
window.DRAWIO_BASE_URL = window.location.protocol + '//' + window.location.host; // Replace with path to base of deployment, e.g. https://www.example.com/folder
window.DRAWIO_VIEWER_URL = window.location.protocol + '//' + window.location.host + '/js/viewer.min.js'; // Replace your path to the viewer js, e.g. https://www.example.com/js/viewer.min.js
window.DRAWIO_LIGHTBOX_URL = window.location.protocol + '//' + window.location.host; // Replace with your lightbox URL, eg. https://www.example.com
urlParams['lang'] = 'zh';
urlParams['browser'] = 1;
urlParams['gapi'] = 0;
urlParams['db'] = 0;
urlParams['od'] = 0; 
urlParams['tr'] = 0;
urlParams['gh'] =0; 
urlParams['gl'] =0;
urlParams['mode'] = 'browser';


默认中文显示:

希望打开页面根据浏览器语言自动切换到对应语言,比如中文浏览器默认切换到zh

lang参数可以控制默认语言,直接请求?lang=zh 表示使用简体中文进行展示

urlParams['lang'] = 'zh';


禁止远程保存

由于项目使用了很多国外的存储服务如Google,在国内打不开,因此将这些存储功能关闭,只保留本地存储和浏览器存储

是否显示保存配置的

browser=0/1: Disables local storage as a storage location (0) or shows the browser option in the storage dialog (1).
gapi=0: Disables the Google integration.
db=0: Disables the Dropbox integration.
od=0: Disables the OneDrive integration.
tr=0: Disables the Trello integration.
gh=0: Disables the Github integration.
gl=0: Disables the GitLab integration.
drive=0: Simulates app.diagrams.net regardless of the domain name (uses the old app ID).


参数 mode

mode=[google|onedrive|github|dropobox|device|browser]: Switches to the specified mode.


配置默认只显示本地和浏览器存储,并且选择浏览器存储

?lang=zh&browser=1&gapi=0&db=0&od=0&tr=0&gh=0&gl=0&storage=device&mode=browser


关闭splash 选择特定图

splash=0: Does not show the splash screen.


该是表示 让用户选择创建新图还是打开图的选择框

libs=key1;key2;...;keyN: Specifies the current libraries. Possible keys are allied_telesis, android, archimate, archimate3, arrows2, atlassian, aws3, aws3d, aws4, azure, basic, bootstrap, bpmn, cabinets, cisco, cisco_safe, citrix, clipart, dfd, eip, electrical, er, floorplan, flowchart, gcp2, general, gmdl, ibm, images, infographic, ios, lean_mapping, mockups, mscae, network, office, pid, rack, signs, sitemap, sysml, uml, veeam and webicons.


各种图的缩写

因此,如下配置应该是只显示流程图

?lang=zh&browser=1&gapi=0&db=0&od=0&tr=0&gh=0&gl=0&device=1&mode=browser&libs=flowchart;general&splash=0


打开文件自带例子

使用create参数可以携带模板信息,直接可以建立一个包含例子的图

?mode=browser&title=Untitled%20Diagram.drawio&create=http%3A%2F%2F127.0.0.1%3A8081%2Ftemplates%2Fflowcharts%2Fdata_flow_1.xml&sync=manual#LUntitled%20Diagram.drawio
create=url/name: Creates a new file from a template URL. If the value is not a URL and is not empty, the script will try to use window.opener[url]. In embed mode, window.opener[name] will be used to get the initial XML. Note that this requires the same origin policy in the opener/parent for reading the variable.


create 参数值,貌似只能传递url地址,不能传递相对路径

自带的模板在 如下路径中

src\main\webapp\templates


官方参数说明:https://www.drawio.com/doc/faq/embed-mode

官方&下载

官网:https://www.draw.io/

在线版:https://app.diagrams.net/

单机版下载:https://github.com/jgraph/drawio-desktop/releases/latest

开源1:https://github.com/jgraph/drawio-desktop/

开源2(Web版):https://github.com/jgraph/drawio/

Docker版:https://github.com/jgraph/docker-drawio


http://www.savh.cn/thread-1424.htm

转载请注明:Savh.Cn 发表

推荐阅读
最新动态 (1)
  • 更新日志

    draw.io 核心更新。

    下载地址

    在线使用:https://app.diagrams.net/?src=about (语言设置先创建一个项目,右上角)

    GitHub:https://get.diagrams.net/


( 登录 ) 后,可以发表评论!

返回