drawio配置详解 打造自己的在线画图工具
家电修理 2023-07-16 19:16www.caominkang.com电器维修
文章目录
- 基于draio的在线绘图工具
- 打造自己的draio
- 个性化配置
- 默认中文显示
- 禁止远程保存
- 关闭splash 选择特定图
- 打开文件自带例子
- 在线服务
- 参考文档
看到大量的微信公众号推荐这个工具,还说很多收费工具是基于这个开发的,不由得想研究一下
学习一个项目最好的方式,莫过于看项目官方介绍,draio的官方文档,然后就是一顿百度、搜狗、有能力的还要谷歌,更换不同的关键词, 看前人踩的坑,有github的也可以看看issus
draio支持使用浏览器参数配置,详细的配置教程
URL hash参数说明
通过配置可以实现很多个性化的需求
不使用参数传递的方式,可以将如下配置写死到 srcmainebappjsPreConfig.js 文件中
如
urlParams['lang'] = 'zh';
官方配置相关资料
可能有用的配置信息
indo.EXPORT_URL = 'REPLACe_WITH_YOUR_IMAGE_SERVER'; indo.PLANT_URL = 'REPLACE_WITH_YOUR_PLANTUML_SERVER'; indo.DRAWIO_base_URL = indo.location.protocol + '//' + indo.location.host; // Replace ith path to base of deployment, e.g. https://.example./folder indo.DRAWIO_VIEWER_URL = indo.location.protocol + '//' + indo.location.host + '/js/vieer.min.js'; // Replace your path to the vieer js, e.g. https://.example./js/vieer.min.js indo.DRAWIO_LIGHTBOX_URL = indo.location.protocol + '//' + indo.location.host; // Replace ith your lightbox URL, eg. https://.example. urlParams['lang'] = 'zh'; urlParams['broser'] = 1; urlParams['gapi'] = 0; urlParams['db'] = 0; urlParams['od'] = 0; urlParams['tr'] = 0; urlParams['gh'] =0; urlParams['gl'] =0; urlParams['mode'] = 'broser';默认中文显示
电脑维修网希望打开页面根据浏览器语言自动切换到对应语言,比如中文浏览器默认切换到zh
lang参数可以控制默认语言,直接请求?lang=zh 表示使用简体中文进行展示
urlParams['lang'] = 'zh';禁止远程保存
由于项目使用了很多国外的存储服务如Google,在国内打不开,将这些存储功能关闭,只保留本地存储和浏览器存储
是否显示保存配置的
broser=0/1: Disables local storage as a storage location (0) or shos the broser 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. regardless of the domain name (uses the old app ID).
参数 mode
mode=[google|onedrive|github|dropobox|device|broser]: Sitches to the specified mode.
配置默认只显示本地和浏览器存储,并且选择浏览器存储
?lang=zh&broser=1&gapi=0&db=0&od=0&tr=0&gh=0&gl=0&storage=device&mode=broser关闭splash 选择特定图
splash=0: Does not sho the splash screen.
应该是表示 让用户选择创建新图还是打开图的选择框
libs=key1;key2;...;keyN: Specifies the current libraries. Possible keys are allied_telesis, android, archimate, archimate3, arros2, atlassian, as3, as3d, as4, azure, basic, bootstrap, bpmn, cabis, cisco, cisco_safe, citrix, clipart, dfd, eip, electrical, er, floorplan, flochart, gcp2, general, gmdl, ibm, images, infographic, ios, lean_mapping, mockups, mscae, ork, office, pid, rack, signs, sitemap, sysml, uml, veeam and ebicons.
各种图的缩写
,如下配置应该是只显示流程图
?lang=zh&broser=1&gapi=0&db=0&od=0&tr=0&gh=0&gl=0&device=1&mode=broser&libs=flochart;general&splash=0打开文件自带例子
使用create参数可以携带模板信息,直接可以建立一个包含例子的图
?mode=broser&title=Untitled%20Diagram.draio&create=http%3A%2F%2F127.0.0.1%3A8081%2Ftemplates%2Fflocharts%2Fdata_flo_1.xml&sync=manual#LUntitled%20Diagram.draio
create=url/name: Creates a ne file from a template URL. If the value is not a URL and is not empty, the script ill try to use indo.opener[url]. In embed mode, indo.opener[name] ill 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地址,不能传递相对路径
自带的模板在 如下路径中
srcmainebapptemplates在线服务
draio 静态站
参考文档draio 官方文档
draio 二次开发优秀项目
draio 编码和解密工具
draio 使用教程
draio 画流程图
上一篇:win10怎么安装? 下一篇:升级Win10后看腾讯视频卡、无响应的解决办法
空调维修
- 我的世界电脑版运行身份怎么弄出来(我的世界
- 空调抽湿是什么意思,设置抽湿的温度有什么意
- 方太燃气灶有一个打不着火 怎么修复与排查方法
- 夏季免费清洗汽车空调的宣传口号
- 清洗完空调后出现漏水现象
- iphone6能玩什么游戏(iphone6游戏)
- 如何设置电脑密码锁屏(如何设置电脑密码锁屏
- win10删除开机密码提示不符合密码策略要求
- 电脑w7显示不是正版(w7不是正版怎么解决)
- 万家乐z8热水器显示e7解决 怎么修复与排查方法
- 1匹空调多少瓦数(1匹空调多少瓦)
- 安卓手机连接电脑用什么软件好(关于安卓手机
- 电脑网页看视频卡是什么原因(爱拍看视频卡)
- 华帝燃气灶点火器一直响然后熄火怎么办:问题
- 电脑壁纸怎么换(关于电脑壁纸怎么换的介绍)
- 冬天空调的出风口应该朝什么方向(冬天空调风