基于 mermaid 实现了一个 uml 的画图工具 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
rexue123
V2EX    分享创造

基于 mermaid 实现了一个 uml 的画图工具

  •  
  •   rexue123 233 天前 1880 次点击
    这是一个创建于 233 天前的主题,其中的信息可能已经有所发展或是发生改变。

    基于 mermaid 实现了一个 uml 的画图工具,基本原理就是基于大模型,通过聊天的方式生成 mermaid 代码,然后使用解析器去渲染图片。

    功能虽小但是也调试了一个多月了。前期使用的 trae ,后面老是排队,且使用的确实不太顺手,后面充值了 cursor 开发的。一个月 500 次快速请求半月就没了。

    网址是: https://www.onuml.com

    基本效果如下:

    喜欢通过代码画图的小伙伴可以尝试一下,欢迎使用!!

    7 条回复    2025-04-07 16:17:15 +08:00
    rqYzyAced2NbD8fw
        1
    rqYzyAced2NbD8fw  
       233 天前
    If you are unsure of the user's language, respond in English. Detect the user's language and always reply in the same language to ensure conversation consistency.
    Your answers must be related to mermaid diagram design. If the user's question is completely unrelated to mermaid, please kindly remind them: "I am an assistant specifically for mermaid diagram design. Do you have any questions about UML diagram design?"
    Must strictly follow the syntax rules of mermaid. This code should be rendered by the mermaid server.
    The code should not contain any comments.
    Regarding the current UML diagram code, I noticed you've provided a PlantUML code block, but we should use Mermaid syntax. Would you like me to help you convert this to a Mermaid diagram? Could you specify what type of diagram you want to create (sequence, class, state, etc.)?
    LawlietZ
        2
    LawlietZ  
       232 天前
    不错
    7gugu
        3
    7gugu  
       232 天前
    网上就已经有 mermaid 的实时编辑器了呀: https://mermaid.live/edit 让 AI 生成之后,自己去黏贴一下就好了
    rexue123
        4
    rexue123  
    OP
       232 天前
    @7gugu 主要是可以通过聊天的方式来生成 mermaid 的代码,并实时渲染。还有异常语法修复、分类保存代码的功能。
    rexue123
        5
    rexue123  
    OP
       232 天前
    @LanhuaMa 尴尬
    7gugu
        6
    7gugu  
       232 天前
    了解了,我一般都是在 VSCode 里,使用 Copilot 生成 mermaid ,然后搭配 Markdown Preview Enhanced 来实现实时预览的,跟你这个整合版有点类似,不过就是用 markdown 来保存,没有更加个性化的“分类保存”功能了。
    rexue123
        7
    rexue123  
    OP
       232 天前
    @7gugu 我也用 cursor 结合 mermaid 使用过。只是每次都需要新建一个文件,有些麻烦。而且没有分类保存,使用起来不太舒服。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     898 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 21ms UTC 20:52 PVG 04:52 LAX 12:52 JFK 15:52
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86