{"id":2282,"date":"2026-05-26T08:05:43","date_gmt":"2026-05-26T08:05:43","guid":{"rendered":"https:\/\/www.vpascode.com\/tw\/docs\/uncategorized\/mermaid-js-flowchart-syntax-guide\/"},"modified":"2026-05-26T08:05:43","modified_gmt":"2026-05-26T08:05:43","slug":"mermaid-js-flowchart-syntax-guide","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/","title":{"rendered":"Mermaid.js \u6d41\u7a0b\u5716\u8a9e\u6cd5\u6307\u5357"},"content":{"rendered":"<h2>\u4ec0\u9ebc\u662f\u6d41\u7a0b\u5716\uff1f<\/h2>\n<p>\u4e00\u500b<strong>\u6d41\u7a0b\u5716<\/strong>\u662f\u4e00\u7a2e\u57fa\u790e\u6027\u7684\u884c\u70ba\u5730\u5716\uff0c\u7528\u4ee5\u8996\u89ba\u5316\u9010\u6b65\u7684\u64cd\u4f5c\u5de5\u4f5c\u6d41\u7a0b\u3001\u6f14\u7b97\u6cd5\u7a0b\u5e8f\u6216\u9806\u5e8f\u6027\u7684\u5546\u696d\u908f\u8f2f\u3002\u900f\u904e\u5c07\u7cfb\u7d71\u52d5\u4f5c\u4ee5\u4e0d\u540c\u7684\u5e7e\u4f55\u5f62\u72c0\u8868\u793a\uff0c\u4e26\u4ee5\u65b9\u5411\u6027\u7bad\u982d\u7e6a\u88fd\u63a7\u5236\u6d41\u7a0b\uff0c\u6d41\u7a0b\u5716\u8b93\u8edf\u9ad4\u5de5\u7a0b\u5e2b\u8207\u7cfb\u7d71\u67b6\u69cb\u5e2b\u80fd\u8f15\u9b06\u8ffd\u8e64\u689d\u4ef6\u57f7\u884c\u8def\u5f91\u3001\u8fa8\u8b58\u55ae\u9ede\u6545\u969c\u5340\u584a\uff0c\u4e26\u5728\u64b0\u5beb\u5be6\u969b\u5f8c\u7aef\u7a0b\u5f0f\u78bc\u4e4b\u524d\u5206\u6790\u7cfb\u7d71\u908f\u8f2f\u8ff4\u5708\u3002<\/p>\n<p>\u4f7f\u7528<strong>Mermaid.js<\/strong>\u60a8\u4e0d\u5fc5\u82b1\u8cbb\u6578\u5c0f\u6642\u62d6\u66f3\u65b9\u6846\u3001\u5fae\u8abf\u683c\u7dda\u6216\u91cd\u65b0\u8a08\u7b97\u5167\u908a\u8ddd\u8b8a\u6578\u3002\u4f48\u5c40\u5f15\u64ce\u6703\u6839\u64da\u60a8\u7684\u539f\u59cb\u5ba3\u544a\u5f0f\u8173\u672c\u52d5\u614b\u8a08\u7b97\u7bc0\u9ede\u5ea7\u6a19\uff0c\u8b93\u60a8\u5c08\u6ce8\u65bc\u7cfb\u7d71\u80cc\u5f8c\u7684\u908f\u8f2f\u3002<\/p>\n<h2>\u6838\u5fc3\u8a9e\u6cd5\u6307\u5357\uff1a\u5143\u7d20\u8207\u7d50\u69cb<\/h2>\n<p>\u8981\u5728 Mermaid \u4e2d\u8a2d\u8a08\u51fa\u512a\u96c5\u4e14\u6975\u6613\u6383\u63cf\u7684\u6d41\u7a0b\u5716\uff0c\u60a8\u5fc5\u9808\u638c\u63e1\u756b\u5e03\u65b9\u5411\u6307\u793a\u3001\u5e7e\u4f55\u7bc0\u9ede\u5c01\u88dd\u3001\u9023\u7d50\u5e03\u7dda\u8b8a\u6578\u8207\u7d50\u69cb\u6027\u5b50\u5716\u3002<\/p>\n<h3>1. \u8a2d\u5b9a\u756b\u5e03\u65b9\u5411<\/h3>\n<p>\u60a8\u7684\u6d41\u7a0b\u5716\u65b9\u5411\u76f4\u63a5\u7531\u7b2c\u4e00\u884c\u61c9\u7528\u65bc<code>graph<\/code>\u6216<code>flowchart<\/code>\u5305\u88dd\u5668\u6c7a\u5b9a\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u56db\u500b\u4e3b\u8981\u65b9\u5411\u9375\u4f86\u63a7\u5236\u4f48\u5c40\u7684\u8996\u89ba\u7e2e\u653e\u65b9\u5411\uff1a<\/p>\n<ul>\n<li><code>flowchart TD<\/code>\uff08\u81ea\u4e0a\u800c\u4e0b\uff0f\u5782\u76f4\u65b9\u5411\uff09<\/li>\n<li><code>flowchart BU<\/code>\uff08\u81ea\u4e0b\u800c\u4e0a\u65b9\u5411\uff09<\/li>\n<li><code>flowchart LR<\/code>\uff08\u81ea\u5de6\u800c\u53f3\uff0f\u6c34\u5e73\u65b9\u5411\uff09<\/li>\n<li><code>flowchart RL<\/code>\uff08\u81ea\u53f3\u800c\u5de6\u65b9\u5411\uff09<\/li>\n<\/ul>\n<h3>2. \u81ea\u8a02\u7bc0\u9ede\u5e7e\u4f55\u5f62\u72c0\uff08\u5f62\u72c0\uff09<\/h3>\n<p>\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u7d14 ID \u8072\u660e\u6703\u986f\u793a\u70ba\u92d2\u5229\u7684\u77e9\u5f62\u65b9\u6846\u3002\u70ba\u4e86\u8b93\u60a8\u7684\u5716\u8868\u66f4\u5bb9\u6613\u6383\u63cf\uff0c\u8acb\u4f7f\u7528 Mermaid \u7684\u5c08\u7528\u5c01\u88dd\u62ec\u865f\uff0c\u70ba\u4e0d\u540c\u5de5\u4f5c\u6d41\u7a0b\u6b65\u9a5f\u6ce8\u5165\u5373\u6642\u7684\u8996\u89ba\u8a9e\u5883\u3002\u6bcf\u500b\u5b9a\u7fa9\u5340\u584a\u90fd\u5fc5\u9808\u4ee5\u65b9\u5411\u6027\u4f48\u5c40\u6a19\u8a18\u958b\u982d\uff0c\u624d\u80fd\u6b63\u78ba\u89e3\u6790\uff1a<\/p>\n<ul>\n<li><strong>\u5713\u89d2\uff1a<\/strong> <code>id(\u6587\u5b57)<\/code>\u2014\u2014 \u8868\u793a\u4e00\u822c\u6d41\u7a0b\u6b65\u9a5f\u3002<\/li>\n<li><strong>\u9ad4\u80b2\u5834\uff0f\u81a0\u56ca\u5f62\u72c0\uff1a<\/strong> <code>id([\u6587\u5b57])<\/code> \u2014 \u6a19\u6e96\u6a19\u8a18\uff0c\u7528\u65bc\u8d77\u59cb\u548c\u505c\u6b62\u908a\u754c\u91cc\u7a0b\u7891\u3002<\/li>\n<li><strong>\u5b50\u7a0b\u5e8f\/\u9810\u5b9a\u7fa9\u6d41\u7a0b\uff1a<\/strong> <code>id[[\u6587\u5b57]]<\/code> \u2014 \u4ee3\u8868\u5c01\u88dd\u7684\u7cfb\u7d71\u4f8b\u884c\u7a0b\u5e8f\u6216\u5916\u90e8\u985e\u5225\u8173\u672c\u3002<\/li>\n<li><strong>\u5713\u67f1\u9ad4\/\u8cc7\u6599\u5eab\uff1a<\/strong> <code>id[(\u6587\u5b57)]<\/code> \u2014 \u4ee3\u8868\u8cc7\u6599\u5eab\u6301\u4e45\u5316\u3001\u5feb\u53d6\u6216\u8cc7\u6599\u5009\u5132\u3002<\/li>\n<li><strong>\u83f1\u5f62\/\u6c7a\u7b56\u947d\u77f3\uff1a<\/strong> <code>id{\u6587\u5b57}<\/code> \u2014 \u4ee3\u8868\u689d\u4ef6\u5207\u63db\u3001if\/else \u5206\u652f\u6216\u8a55\u4f30\u9ede\u3002<\/li>\n<li><strong>\u5e73\u884c\u56db\u908a\u5f62\uff1a<\/strong> <code>id[\/\u6587\u5b57\/]<\/code> \u6216 <code>id[\u6587\u5b57]<\/code> \u2014 \u5448\u73fe\u50be\u659c\u908a\u754c\uff0c\u4ee5\u4ee3\u8868\u660e\u78ba\u7684\u8cc7\u6599\u8f38\u5165\/\u8f38\u51fa (I\/O)\u3002<\/li>\n<\/ul>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLy8kvT85ILCpRCHHh5VIAguISIC8+Lz8lVSM6GMRWcK1ITS4tyczPi9WEKCksTS2qjE9JitYIyC8uSS9KDQ70UfDMA+rMS07VjIUoKkvMyUxJLEmNT85ITc6u9ixWcCwtycgvyqxKTbGvBQBvyCjM\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAEFxSWJRSXxefkqqRvTLad1Pl3c\/nb\/9xcKeWE2IfGFpalFlfEpStEZAfnFJelFqcKCPwtP1y57s69aMhSgpS8zJTEksSY1PzkhNzq5+NmP90wnLnm7f9Kyv49marvd75tcCADE9Ns4=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">\u6d41\u7a0b\u5716 TD\r\n    start_node([\u958b\u59cb\u57f7\u884c])\r\n    query_db[(PostgreSQL \u5be6\u4f8b)]\r\n    validate_check{\u662f\u5426\u5df2\u6388\u6b0a\uff1f}<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAEFxSWJRSXxefkqqRvTLad1Pl3c\/nb\/9xcKeWE2IfGFpalFlfEpStEZAfnFJelFqcKCPwtP1y57s69aMhSgpS8zJTEksSY1PzkhNzq5+NmP90wnLnm7f9Kyv49marvd75tcCADE9Ns4=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLy8kvT85ILCpRCHHh5VIAguISIC8+Lz8lVSM6GMRWcK1ITS4tyczPi9WEKCksTS2qjE9JitYIyC8uSS9KDQ70UfDMA+rMS07VjIUoKkvMyUxJLEmNT85ITc6u9ixWcCwtycgvyqxKTbGvBQBvyCjM\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"jWBAKCL\"><img fetchpriority=\"high\" alt=\"\" class=\"alignnone size-full wp-image-613\" decoding=\"async\" fetchpriority=\"high\" height=\"173\" sizes=\"(max-width: 570px) 100vw, 570px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png 570w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5-300x91.png 300w\" width=\"570\"\/><\/p>\n<h3>3. \u9023\u7d50\u5e03\u7dda\u898f\u5247\u8207\u5167\u5d4c\u6a19\u7c64<\/h3>\n<p>\u60a8\u53ef\u4ee5\u8abf\u6574\u9023\u63a5\u7dda\u4ee5\u4ee3\u8868\u4e0d\u540c\u7684\u7d50\u69cb\u95dc\u4fc2\u548c\u901a\u8a0a\u98a8\u683c\u3002\u70ba\u4fdd\u6301\u5716\u8868\u6574\u6f54\uff0c\u53ef\u76f4\u63a5\u5c07\u63cf\u8ff0\u6027\u6a19\u7c64\u6ce8\u5165\u5230\u9023\u7d50\u8def\u5f91\u4e0a\uff1a<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp9zL8KwjAYBPC90Hc4Ch2rT1Chf1wcVGjBOU0iCYZ8kH5ahT68sYI4iDfdcPc7O5qkEYHRt2mCmDxHx8IrERQkea8lU4AIgSZMlg1Y3xlODNq9DxWKYoM523WHPY7i4UiobEadJh+wJWat1tX48NIE8nQd4azXv8EaxWoRlz22N+05gs0X2BsrLxjIKa3+SA3K8gU1wbKVwuEUi45W+wR14EpC\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAIGqqsKzFTOf7Zr2smHxs76lz9etfblg7ZMdy17ObHk2rf3p2ulA2ecbl0AUOyro6top1Ch5Bfv7KbzYtODFnk6lGgUnXi64WS93z3ve3aD\/cu68pxN6nq1d+nz7LFyGOSno6oFNgyt+sqv7ye5tQBOdkUx8vmn6y9VT8JjjrGBrCzZm+pyXvVufrl\/9tHUp0AwXAGwAdK0=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">\u6d41\u7a0b\u5716 TD\r\n    %% \u6a19\u6e96\u9023\u63a5\u7bad\u982d\u4e26\u9644\u6587\u5b57\u6a19\u7c64\r\n    A --&gt; |\"JSON \u8ca0\u8f09\"| B\r\n\r\n    %% \u9ede\u72c0\/\u975e\u540c\u6b65\u7dda\u4e26\u9644\u6587\u5b57\u6a19\u7c64\r\n    B -.-&gt; |\"\u975e\u540c\u6b65\u4e8b\u4ef6\"| C\r\n\r\n    %% \u7c97\u9ad4\u7dda\u4e26\u9644\u6587\u5b57\u6a19\u7c64\r\n    C ==&gt; |\"\u95dc\u9375\u5beb\u5165\"| D<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAIGqqsKzFTOf7Zr2smHxs76lz9etfblg7ZMdy17ObHk2rf3p2ulA2ecbl0AUOyro6top1Ch5Bfv7KbzYtODFnk6lGgUnXi64WS93z3ve3aD\/cu68pxN6nq1d+nz7LFyGOSno6oFNgyt+sqv7ye5tQBOdkUx8vmn6y9VT8JjjrGBrCzZm+pyXvVufrl\/9tHUp0AwXAGwAdK0=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp9zL8KwjAYBPC90Hc4Ch2rT1Chf1wcVGjBOU0iCYZ8kH5ahT68sYI4iDfdcPc7O5qkEYHRt2mCmDxHx8IrERQkea8lU4AIgSZMlg1Y3xlODNq9DxWKYoM523WHPY7i4UiobEadJh+wJWat1tX48NIE8nQd4azXv8EaxWoRlz22N+05gs0X2BsrLxjIKa3+SA3K8gU1wbKVwuEUi45W+wR14EpC\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"igwGmSf\"><img alt=\"\" class=\"alignnone size-full wp-image-614\" decoding=\"async\" height=\"454\" sizes=\"(max-width: 113px) 100vw, 113px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902ac35bd4.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902ac35bd4.png 113w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902ac35bd4-75x300.png 75w\" width=\"113\"\/><\/p>\n<h3>4. \u900f\u904e\u5b50\u5716\u5be6\u73fe\u6a21\u7d44\u5316\u9694\u96e2<\/h3>\n<p>\u70ba\u5efa\u7acb\u6e05\u6670\u7684\u7db2\u8def\u908a\u754c\u3001\u6574\u5408\u5fae\u670d\u52d9\u6216\u9694\u96e2\u5718\u968a\u8cac\u4efb\uff0c\u8acb\u5c07\u60a8\u7684\u5143\u4ef6\u7fa4\u7d44\u5728\u7d50\u69cb\u6027<code>\u5b50\u5716<\/code>\u5305\u88dd\u5668\u4e2d\u3002\u60a8\u53ef\u900f\u904e\u7d66\u4e88\u5167\u90e8 ID\u3001\u53ef\u9078\u7684\u986f\u793a\u6a19\u984c\uff0c\u4e26\u4ee5<code>\u7d50\u675f<\/code> \u6a19\u7c64\uff1a<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLy8kvT85ILCpRCHHh5VIAguLSpPSixIIMhcTSkox4IC9aKTg1ubQos6RSwSm\/NC8lsahSKRaiFgTSE0tSyxMrox0DPBXcIexYBV1dO4j+8vyi7NQijZD87NQ8hbDEnMyUxJL8Ik2I9tS8FAChvimf\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAMHTtRNA3MTSkoz44tKkaKWn6zqftq542dT1fGqPUixEEQikJ5aklidWRjsGeCo837bp5fQ5sQq6unYQneX5RdmpRRpPdi953tnzcuX0F2s7n85coQnR\/XzrhGdz5wMAakY4Aw==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">\u6d41\u7a0b\u5716 TD\r\n    \u5b50\u5716 auth_sub[\"\u5b89\u5168\u908a\u754c\"]\r\n        gateway[API \u7db2\u95dc] --&gt; auth_worker(\u4ee4\u724c\u9a57\u8b49\u5668)\r\n    \u7d50\u675f<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp7trXx+Yrup3OmKYS48HIpAMHTtRNA3MTSkoz44tKkaKWn6zqftq542dT1fGqPUixEEQikJ5aklidWRjsGeCo837bp5fQ5sQq6unYQneX5RdmpRRpPdi953tnzcuX0F2s7n85coQnR\/XzrhGdz5wMAakY4Aw==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLy8kvT85ILCpRCHHh5VIAguLSpPSixIIMhcTSkox4IC9aKTg1ubQos6RSwSm\/NC8lsahSKRaiFgTSE0tSyxMrox0DPBXcIexYBV1dO4j+8vyi7NQijZD87NQ8hbDEnMyUxJL8Ik2I9tS8FAChvimf\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"GfaAkHz\"><img alt=\"\" class=\"alignnone size-full wp-image-615\" decoding=\"async\" height=\"140\" sizes=\"(max-width: 457px) 100vw, 457px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902bb7e3ea.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902bb7e3ea.png 457w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902bb7e3ea-300x92.png 300w\" width=\"457\"\/><\/p>\n<h2>\u6e05\u6670\u6d41\u7a0b\u5716\u7684\u6700\u4f73\u5be6\u52d9<\/h2>\n<ul>\n<li><strong>\u6c34\u5e73\u5206\u96e2\u4f48\u5c40\uff1a<\/strong> \u5c0d\u65bc\u9577\u4e14\u591a\u6b65\u9a5f\u7684\u5de5\u7a0b\u7ba1\u9053\uff0c\u9078\u64c7 <code>\u6d41\u7a0b\u5716 LR<\/code> \u65b9\u5411\u3002\u8207\u9577\u689d\u5782\u76f4\u4f48\u5c40\u76f8\u6bd4\uff0c\u9019\u7a2e\u65b9\u5f0f\u5728\u6a19\u6e96\u7684\u5bec\u87a2\u5e55\u6a6b\u5411\u87a2\u5e55\u4e0a\u53ef\u64f4\u5c55\u6027\u66f4\u4f73\u3002<\/li>\n<li><strong>\u9694\u96e2\u8907\u96dc\u8ff4\u5708\uff1a<\/strong> \u5982\u679c\u5de5\u4f5c\u6d41\u7a0b\u5305\u542b\u5927\u91cf\u91cd\u8907\u7684\u8ff4\u5708\uff0c\u8acb\u660e\u78ba\u6a19\u793a\u53cd\u5411\u9023\u63a5\u5668\uff08\u4f8b\u5982\uff0c<code>retry --&gt; |\"\u5617\u8a66\u91cd\u7f6e\"| start<\/code>\uff09\u4ee5\u907f\u514d\u8b80\u8005\u5c07\u8ff4\u5708\u8aa4\u8a8d\u70ba\u662f\u6a19\u6e96\u7684\u524d\u5411\u8def\u5f91\u3002<\/li>\n<li><strong>\u907f\u514d\u6df7\u5408\u5716\u5f62\u985e\u578b\uff1a<\/strong> \u5805\u6301\u4f7f\u7528\u73fe\u4ee3\u7684 <code>\u6d41\u7a0b\u5716<\/code> \u95dc\u9375\u5b57\uff0c\u800c\u975e\u820a\u5f0f\u7684 <code>\u5716<\/code> \u6a19\u8a8c\u4f86\u6e32\u67d3\u8907\u96dc\u5730\u5716\u3002<code>\u6d41\u7a0b\u5716<\/code>\u5f15\u64ce\u4f7f\u7528\u66f4\u65b0\u7684\u4f48\u5c40\u6f14\u7b97\u6cd5\uff0c\u652f\u63f4\u9032\u968e\u7684\u7bad\u982d\u7d44\u5408\u8207\u66f4\u6e05\u6670\u7684\u8def\u5f91\u8def\u7531\u3002<\/li>\n<\/ul>\n<h2>\u73fe\u5be6\u4e16\u754c\u4e2d\u7684 Mermaid.js \u6d41\u7a0b\u5716\u7bc4\u4f8b<\/h2>\n<h3>\u7bc4\u4f8b 1\uff1a\u5fae\u670d\u52d9\u4e8b\u4ef6\u9a45\u52d5\u7684\u8cc7\u6599\u63a5\u6536\u7db2\u72c0\u7d50\u69cb\uff08\u5de6\u81f3\u53f3\u67b6\u69cb\uff09<\/h3>\n<p>\u6b64\u529f\u80fd\u85cd\u5716\u6a21\u64ec\u4e86\u4e00\u500b\u7db2\u9801\u9059\u6e2c\u8cc7\u6599\u63a5\u6536\u670d\u52d9\u3002\u5b83\u5c55\u793a\u4e86\u5982\u4f55\u5728\u6e05\u6670\u7684\u6c34\u5e73\u756b\u5e03\u4e0a\u7d50\u5408\u8cc7\u6599\u8f38\u5165\u3001\u5224\u65b7\u83f1\u5f62\u8207\u96f2\u7aef\u8cc7\u6599\u5eab\u5f62\u72c0\u3002<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UU1v2zAMvQ\/YfyA6FHCBBW36gQ497NAExbbu0AZuezACQ5HomrAseRJVpx\/775PtuPMO04EAqfceycdC21aWwjH8XH38APHt78MSCzIIqLFGw2CsQg8tcQm4bTRJYnhEWyO7Z\/ClaNAPVDLESfaAm9LaCq7IoVofwGz2Nf40gXOy2eFCNBwcwrc0vYEV\/gro+XA98gdUTxGBy1yWKKvXe6FJCUZIbYXm9wAe4l9UT3rb+26eOvQA3XsDdC73bJskW2FsbOD0aA53puNZRy\/dhP9R6rvCj4c0qrSOGPM4bMAsuwkbTb4EtnAtikrAbVdfr6dzTQi9XGtdhS5vnJXJwhofanSwFFhbs+s\/QfQMtenmdpglKdXopdC4vISFDp7RHeyajaCeEet1kqUxkoluKbiKx+3Wez\/sbaC4nowStgbPzxrBPkWHSI0nHIoTLwrS+uJTURQnUn327KKtXSrnR+e7dNaS4vLiuNlOJUbfR4Ev6lyJdwElT85Oz\/4VmDfbPxln1jw=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1kVtLG0EYhu8F\/8OgCBswaDygeNGL0ovSelFKwItlWdbdWbJs7G4nE6LUQoyHJE2thTaesW0qbayNpVrrISb+mcxh\/4V7SHS9cC4GPuZ53\/m+96OnC6xaIrvrYPJldxdwT18faDWu2ecq3fzAKpdse4lcNFuNMmlUWClLjrZZ84AsL7J\/X9mfrFPfC1TGKwML4hScTliWCfjPc7Z1JUVANPrIfbLTWDYscYCultnqMXgaj78A\/LBE\/+YGpI48YHyBksYJWU1A1XzjHGzwWrFV32fF928DNLjvGF8y38OWvtFyISB75gFESE5hyxZEsrNHcidgZDAGPOb3O2froxR5wIXuFl0X8Gwq7npkkIGh\/DoN01AU3XnI+SLPn4Dnim4qbkZ5UtiQpHBTIYHvl7GQCZFsI0sV6P8CP67z7DI5KvDamRf65Vq7jRDn67Rpr3cERSFuzMCUqiThk8fA2Vlhzf1I+8cO4wswRDOCyE5ztFah\/ka9CW\/3Sa4PnewXnv\/Fqzla\/U6u1viPFf6pFAApPJeE4Sh0I5mc6NV1fVjV+lMYWSb0SjU2ONYuoxlDw4mJIXs2bNHJvGMwro1pyq2Bpg6PjozeN4jZszdOkg+S\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">\u6d41\u7a0b\u5716 LR\r\n    %% \u4f7f\u7528\u660e\u78ba\u7684\u5e7e\u4f55\u5f62\u72c0\u5b9a\u7fa9\u5143\u7d20\u7bc0\u9ede\r\n    init([Webhook \u89f8\u767c]) --&gt; input_io[\/\u6355\u7372 HTTP \u8acb\u6c42\/]\r\n    input_io --&gt; auth_check{\u9a57\u8b49\u4ee4\u724c}\r\n    \r\n    auth_check --&gt; |\"\u7121\u6548\u4ee4\u724c\"| err_stop([\u56de\u50b3 401 \u7121\u6b0a\u9650])\r\n    auth_check --&gt; |\"\u6709\u6548 JWT\"| write_queue[[\u767c\u5e03\u81f3 Kafka \u4f47\u5217]]\r\n    \r\n    write_queue --&gt; worker_proc(\u6d88\u8cbb\u8005\u5b88\u8b77\u7a0b\u5e8f)\r\n    worker_proc --&gt; db_store[(TimescaleDB \u96c6\u7fa4)]\r\n    db_store --&gt; term([\u7d42\u6b62\u6d41\u7a0b])\r\n\r\n    %% \u5feb\u901f\u81ea\u8a02\u6a23\u5f0f\u8986\u84cb\r\n    style auth_check fill:#fff3cd,stroke:#ffc107,stroke-width:2px\r\n    style err_stop fill:#f8d7da,stroke:#dc3545,stroke-width:1px<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1kVtLG0EYhu8F\/8OgCBswaDygeNGL0ovSelFKwItlWdbdWbJs7G4nE6LUQoyHJE2thTaesW0qbayNpVrrISb+mcxh\/4V7SHS9cC4GPuZ53\/m+96OnC6xaIrvrYPJldxdwT18faDWu2ecq3fzAKpdse4lcNFuNMmlUWClLjrZZ84AsL7J\/X9mfrFPfC1TGKwML4hScTliWCfjPc7Z1JUVANPrIfbLTWDYscYCultnqMXgaj78A\/LBE\/+YGpI48YHyBksYJWU1A1XzjHGzwWrFV32fF928DNLjvGF8y38OWvtFyISB75gFESE5hyxZEsrNHcidgZDAGPOb3O2froxR5wIXuFl0X8Gwq7npkkIGh\/DoN01AU3XnI+SLPn4Dnim4qbkZ5UtiQpHBTIYHvl7GQCZFsI0sV6P8CP67z7DI5KvDamRf65Vq7jRDn67Rpr3cERSFuzMCUqiThk8fA2Vlhzf1I+8cO4wswRDOCyE5ztFah\/ka9CW\/3Sa4PnewXnv\/Fqzla\/U6u1viPFf6pFAApPJeE4Sh0I5mc6NV1fVjV+lMYWSb0SjU2ONYuoxlDw4mJIXs2bNHJvGMwro1pyq2Bpg6PjozeN4jZszdOkg+S\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UU1v2zAMvQ\/YfyA6FHCBBW36gQ497NAExbbu0AZuezACQ5HomrAseRJVpx\/775PtuPMO04EAqfceycdC21aWwjH8XH38APHt78MSCzIIqLFGw2CsQg8tcQm4bTRJYnhEWyO7Z\/ClaNAPVDLESfaAm9LaCq7IoVofwGz2Nf40gXOy2eFCNBwcwrc0vYEV\/gro+XA98gdUTxGBy1yWKKvXe6FJCUZIbYXm9wAe4l9UT3rb+26eOvQA3XsDdC73bJskW2FsbOD0aA53puNZRy\/dhP9R6rvCj4c0qrSOGPM4bMAsuwkbTb4EtnAtikrAbVdfr6dzTQi9XGtdhS5vnJXJwhofanSwFFhbs+s\/QfQMtenmdpglKdXopdC4vISFDp7RHeyajaCeEet1kqUxkoluKbiKx+3Wez\/sbaC4nowStgbPzxrBPkWHSI0nHIoTLwrS+uJTURQnUn327KKtXSrnR+e7dNaS4vLiuNlOJUbfR4Ev6lyJdwElT85Oz\/4VmDfbPxln1jw=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"mpzcybi\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-616\" decoding=\"async\" height=\"181\" loading=\"lazy\" sizes=\"auto, (max-width: 1597px) 100vw, 1597px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26.png 1597w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26-300x34.png 300w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26-1024x116.png 1024w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26-768x87.png 768w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902c872f26-1536x174.png 1536w\" width=\"1597\"\/><\/p>\n<p><strong>\u8a9e\u6cd5\u5206\u89e3\uff1a<\/strong> \u6b64\u5716\u8868\u5f9e\u5de6\u5230\u53f3\u6d41\u66a2\u5730\u5c55\u958b\u3002\u9a57\u8b49\u6b65\u9a5f\u4f7f\u7528\u9ec3\u8272\u7684\u6c7a\u7b56\u83f1\u5f62\u5f62\u72c0\uff08<code>auth_check{\u9a57\u8b49\u4ee4\u724c}<\/code>\uff09\uff0c\u5c07\u57f7\u884c\u8def\u5f91\u6e05\u6670\u5730\u5206\u6210\u5169\u500b\u4e0d\u540c\u7684\u7d50\u679c\u3002\u7531\u65bc\u5176\u81ea\u8a02\u7684\u8cc7\u6599\u5eab\u5713\u67f1\u5f62\uff08<code>[(TimescaleDB \u96c6\u7fa4)]<\/code>\uff09\u548c\u5e73\u884c\u56db\u908a\u5f62\u8f38\u5165\uff0c\u8cc7\u6599\u5132\u5b58\u5340\u7acb\u5373\u53ef\u8fa8\u8b58\u3002<\/p>\n<h3>\u7bc4\u4f8b 2\uff1a\u4f01\u696d\u591a\u5c64\u7d1a\u4f7f\u7528\u8005\u8a3b\u518a\u5f15\u64ce\uff08\u5782\u76f4\u4e14\u5305\u542b\u5d4c\u5957\u5b50\u5716\uff09<\/h3>\n<p>\u6b64\u5148\u9032\u4f01\u696d\u85cd\u5716\u898f\u5283\u51fa\u61c9\u7528\u7a0b\u5f0f\u8a3b\u518a\u6d41\u7a0b\u3002\u5b83\u5c07\u6b65\u9a5f\u5782\u76f4\u6392\u5217\u65bc\u4e09\u500b\u7368\u7acb\u7684\u7d50\u69cb\u5b50\u5716\u4e2d\uff0c\u4ee5\u4ee3\u8868\u4e0d\u540c\u7684\u67b6\u69cb\u5c64\u7d1a\u3002<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkd1qwkAQhe8LvsMQEPRCpC9QSCNthbYEo\/UiSNhsRl2a7KazGzXgw3di1Gp\/oHsRNjNnds58s8zNVq4FOZiOOjfAx1bpikS5hiBXqF0yVUixFxJa\/hNOGQ2zMTyLGslbtCXNEWUZv5hU5Qh+WbLkIrfFNJ5jClHowwMZ7VBnxzTfOjffGkdIGyXx2DkwhPAoHG5FDRNTueu+JZldHcevK6V3MNYr9mlhghskixA2ycWly8qtE7uRPZ8vp0YwN\/SO1P\/bUcivKcu2z64ilBVhBiPhBARM5tpVIZROsjTuzSwS+FKaSjvLflQhqIbRff9CLIVcY6JNhnFvgpmybMzaBnTQZPo\/UXW7MMKl0gjSFEWllWwXU6oScw5bEJIMg+AJbM3GC8ibhdm2nHcFgwF4T9NpGDGsjwqt8zh01+JsVby1f6ja7yFwSO29w45guLkdNrS9\/Rn6ZcEpdqx5Q1LL+jQ313wx+VUf8NjKncCy\/gj8E58B26k=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqFkd9KAkEUxu+D3mFYCPQiohcIoi7qJiTtaglZ1ykXapVds4Iu+l9mskZlKQZJBitisUkpWvkye3Zm36KxsVr6Q3MxM5z5Hc4337ewFF+VY5KWRKHJwQHElr4SWdSkRAxNLClYTYZDCtZEgZZNUmmDVUFz04gdwjyne0tKJERaPobMuXOQJmcmMTPwbDDQw6ziiEieHtzrLRQMjCNIZ0ntvv+O1ejgwLfhQaylFBn3pzvXLejuuPlLd+sUCiZt3pMzi128KhJafG1dFGcWFXUNwd4tGDdgZCF3YnduSG5\/3it4JRkL6ynZ51YvaD3tlLKQKUDz1n4pce3+v4UFsKYrehKrn+LAuLC7V7TeJMVd2jhw8gW7VWdyveKWJUUNRyOiz37pMofo5h60Gs7hk93q8BZo1\/weXpbkGA6r8SgWfbM4qujIKe3QqgXdGhh5\/0\/jhoYQ3BXJa5U2TajnSKNDHi2WE9PkbhapeUTuysw8DrPA0PAwEqZCoUAQ0VrGsbYFVhnjJnKIJfY\/xPf3wvvThsCzQSOp0ZGezcLGp9vejo9av+kjh94XWcfX73+lHSNntyvcQEb3vX0DhOgs3g==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">flowchart TD\r\n    subgraph Client_Tier[\"\u8868\u793a\u5c64 UI \u5c64\"]\r\n        app[\u884c\u52d5\u61c9\u7528\u7a0b\u5f0f UI]\r\n        web[\u7db2\u9801 SPA \u524d\u7aef]\r\n    end\r\n\r\n    subgraph Service_Tier[\"\u6838\u5fc3\u9598\u9053\u5668\u8def\u7531\u5668\"]\r\n        proxy[[Nginx \u5165\u53e3\u53cd\u5411\u4ee3\u7406]]\r\n        auth_svc(\u9a57\u8b49\u670d\u52d9\u5de5\u4f5c\u7a0b\u5f0f)\r\n    end\r\n\r\n    subgraph Persistence_Tier[\"\u53d7\u4fdd\u8b77\u7684\u8cc7\u6599\u4e2d\u5fc3\"]\r\n        main_db[(\u4f7f\u7528\u8005\u5e33\u6236\u4e3b\u8cc7\u6599\u5eab)]\r\n        cache_node[(Redis \u6703\u8a71\u5feb\u53d6)]\r\n    end\r\n\r\n    %% \u5b9a\u7fa9\u8de8\u5b50\u7cfb\u7d71\u5c64\u7684\u901a\u8a0a\u7ba1\u9053\r\n    app -- \"HTTPS \u8acb\u6c42\" --&gt; proxy\r\n    web -- \"HTTPS \u8acb\u6c42\" --&gt; proxy\r\n    \r\n    proxy --&gt; |\"\u8def\u7531 \/v1\/auth\"| auth_svc\r\n    \r\n    auth_svc --&gt; |\"\u9a57\u8b49\u6703\u8a71\"| cache_node\r\n    auth_svc --&gt; |\"\u63d0\u4ea4\u5e33\u6236\"| main_db<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqFkd9KAkEUxu+D3mFYCPQiohcIoi7qJiTtaglZ1ykXapVds4Iu+l9mskZlKQZJBitisUkpWvkye3Zm36KxsVr6Q3MxM5z5Hc4337ewFF+VY5KWRKHJwQHElr4SWdSkRAxNLClYTYZDCtZEgZZNUmmDVUFz04gdwjyne0tKJERaPobMuXOQJmcmMTPwbDDQw6ziiEieHtzrLRQMjCNIZ0ntvv+O1ejgwLfhQaylFBn3pzvXLejuuPlLd+sUCiZt3pMzi128KhJafG1dFGcWFXUNwd4tGDdgZCF3YnduSG5\/3it4JRkL6ynZ51YvaD3tlLKQKUDz1n4pce3+v4UFsKYrehKrn+LAuLC7V7TeJMVd2jhw8gW7VWdyveKWJUUNRyOiz37pMofo5h60Gs7hk93q8BZo1\/weXpbkGA6r8SgWfbM4qujIKe3QqgXdGhh5\/0\/jhoYQ3BXJa5U2TajnSKNDHi2WE9PkbhapeUTuysw8DrPA0PAwEqZCoUAQ0VrGsbYFVhnjJnKIJfY\/xPf3wvvThsCzQSOp0ZGezcLGp9vejo9av+kjh94XWcfX73+lHSNntyvcQEb3vX0DhOgs3g==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkd1qwkAQhe8LvsMQEPRCpC9QSCNthbYEo\/UiSNhsRl2a7KazGzXgw3di1Gp\/oHsRNjNnds58s8zNVq4FOZiOOjfAx1bpikS5hiBXqF0yVUixFxJa\/hNOGQ2zMTyLGslbtCXNEWUZv5hU5Qh+WbLkIrfFNJ5jClHowwMZ7VBnxzTfOjffGkdIGyXx2DkwhPAoHG5FDRNTueu+JZldHcevK6V3MNYr9mlhghskixA2ycWly8qtE7uRPZ8vp0YwN\/SO1P\/bUcivKcu2z64ilBVhBiPhBARM5tpVIZROsjTuzSwS+FKaSjvLflQhqIbRff9CLIVcY6JNhnFvgpmybMzaBnTQZPo\/UXW7MMKl0gjSFEWllWwXU6oScw5bEJIMg+AJbM3GC8ibhdm2nHcFgwF4T9NpGDGsjwqt8zh01+JsVby1f6ja7yFwSO29w45guLkdNrS9\/Rn6ZcEpdqx5Q1LL+jQ313wx+VUf8NjKncCy\/gj8E58B26k=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"pSGGZOL\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-617\" decoding=\"async\" height=\"644\" loading=\"lazy\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902d48117d.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902d48117d.png 511w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902d48117d-238x300.png 238w\" width=\"511\"\/><\/p>\n<p><strong>\u8a9e\u6cd5\u5206\u89e3\uff1a<\/strong> \u5f9e\u4e0a\u5230\u4e0b\u7684\u65b9\u5411\u6307\u793a\u7b26\uff08<code>flowchart TD<\/code>\uff09\u8feb\u4f7f\u4f48\u5c40\u5f15\u64ce\u5c07\u5143\u4ef6\u6574\u9f4a\u5730\u5f9e\u4e0a\u5230\u4e0b\u5806\u758a\u3002\u908a\u754c\u5340\u584a\u5c07\u76f8\u95dc\u5143\u4ef6\u5206\u7d44\u70ba\u4e0d\u540c\u7684\u5c64\u7d1a\uff08\u5ba2\u6236\u7aef\u3001\u670d\u52d9\u8207\u6301\u4e45\u5316\uff09\uff0c\u4f7f\u6574\u9ad4\u67b6\u69cb\u5448\u73fe\u76f4\u89ba\u4e14\u9ad8\u5ea6\u7d50\u69cb\u5316\u7684\u611f\u89ba\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u9ebc\u662f\u6d41\u7a0b\u5716\uff1f \u4e00\u500b\u6d41\u7a0b\u5716\u662f\u4e00\u7a2e\u57fa\u790e\u6027\u7684\u884c\u70ba\u5730\u5716\uff0c\u7528\u4ee5\u8996\u89ba\u5316\u9010\u6b65\u7684\u64cd\u4f5c\u5de5\u4f5c\u6d41\u7a0b\u3001&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":1,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"ld_collection":[14],"class_list":["post-2282","ld_docs","type-ld_docs","status-publish","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide<\/title>\n<meta name=\"description\" content=\"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide\" \/>\n<meta property=\"og:description\" content=\"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/\",\"name\":\"Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/img_6a1902a0955b5.png\",\"datePublished\":\"2026-05-26T08:05:43+00:00\",\"description\":\"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/img_6a1902a0955b5.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/img_6a1902a0955b5.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-flowchart-syntax-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mermaid.js \u6d41\u7a0b\u5716\u8a9e\u6cd5\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide","description":"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/","og_locale":"zh_TW","og_type":"article","og_title":"Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide","og_description":"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.","og_url":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/","og_site_name":"VPasCode","og_image":[{"url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u9810\u4f30\u95b1\u8b80\u6642\u9593":"4 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/","url":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/","name":"Mermaid Flowchart Syntax | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png","datePublished":"2026-05-26T08:05:43+00:00","description":"Create logic decision flowcharts with Mermaid.js in VPasCode, a web-based diagram-as-code tool for software developers.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/#primaryimage","url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png","contentUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1902a0955b5.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-flowchart-syntax-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/tw\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/tw\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Mermaid.js \u6d41\u7a0b\u5716\u8a9e\u6cd5\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/tw\/#website","url":"https:\/\/www.vpascode.com\/tw\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/tw\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/tw\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/tw\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.vpascode.com\/tw\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/tw\/wp-content\/uploads\/sites\/2\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/tw\/wp-content\/uploads\/sites\/2\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/tw\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_docs\/2282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/users\/4"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/media?parent=2282"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_collection?post=2282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}