日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Markdown流程图

發(fā)布時間:2024/3/13 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Markdown流程图 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

    • 基本流程圖
    • 方向調整
    • 狀態(tài)標記
    • 箭頭高亮

基本流程圖

Markdown常用的元素有以下幾種:

  • start
  • end
  • operation
  • condition
  • inputoutput
  • subroutine

    以簡單的登錄場景為例,流程圖代碼和效果如下:

start=>start: 開始 loginInfo=>inputoutput: 登錄數(shù)據(jù) verifyLogin=>subroutine: 登錄驗證 isSuccess=>condition: 驗證成功? respondSuccess=>operation: 響應成功 responseFailure=>operation: 響應失敗 end=>end: 結束start->loginInfo->verifyLogin->isSuccess isSuccess(yes)->respondSuccess->end isSuccess(no)->responseFailure->end Created with Rapha?l 2.1.2 開始 登錄數(shù)據(jù) 登錄驗證 驗證成功? 響應成功 結束 響應失敗 yes no

注意:冒號和名稱之間需要有一個空格。

方向調整

繪制流程圖有時會出現(xiàn)比較一言難盡的情況,例如:

start=>start: start operation1=>operation: operation1 isSuccess=>condition: success? operation2=>operation: operation2 operation3=>operation: operation3 operation4=>operation: operation4 end=>end: 結束start->operation1->isSuccess isSuccess(yes)->operation2->end isSuccess(no)->operation3->operation4->operation1 Created with Rapha?l 2.1.2 start operation1 success? operation2 結束 operation3 operation4 yes no

這種情況下可以使用left、right和bottom關鍵字來調整線條的位置使流程圖更加清晰,例如此處給operation4元素添加right關鍵字,就可以分離重疊的線條。

start=>start: start operation1=>operation: operation1 isSuccess=>condition: success? operation2=>operation: operation2 operation3=>operation: operation3 operation4=>operation: operation4 end=>end: 結束start->operation1->isSuccess isSuccess(yes)->operation2->end isSuccess(no)->operation3->operation4(right)->operation1 Created with Rapha?l 2.1.2 start operation1 success? operation2 結束 operation3 operation4 yes no

如果給condition元素添加這些關鍵字的話會調整整個分支的方向:

start=>start: start operation1=>operation: operation1 isSuccess=>condition: success? operation2=>operation: operation2 operation3=>operation: operation3 operation4=>operation: operation4 end=>end: 結束start->operation1->isSuccess isSuccess(yes)->operation2->end isSuccess(no,left)->operation3->operation4(left)->operation1 Created with Rapha?l 2.1.2 start operation1 success? operation2 結束 operation3 operation4 yes no

狀態(tài)標記

Markdown會使用不同的顏色來標記狀態(tài),狀態(tài)主要有以下幾種:

  • past
  • current
  • future
  • approved
  • rejected
  • invalid

以軟件生命周期的一部分為例:

start=>start: 開始|past requirementAnalysis=>operation: 需求分析|past design=>operation: 軟件設計|past coding=>operation: 編碼|past selfTestingPased=>condition: 自測通過?|approved debug=>operation: debug|invalid submitTestingPased=>condition: 提測通過?|rejected modifyBug=>operation: 修bug|current deploy=>operation: 部署|future end=>end: 結束|futurestart->requirementAnalysis->design->coding->selfTestingPased selfTestingPased(no)->debug(right)->selfTestingPased selfTestingPased(yes)->submitTestingPased submitTestingPased(yes)->deploy->end submitTestingPased(no)->modifyBug(right)->submitTestingPased

箭頭高亮

可以通過高亮某些箭頭來標記出主流程:

start=>start: 開始 loginInfo=>inputoutput: 登錄數(shù)據(jù) verifyLogin=>subroutine: 登錄驗證 isSuccess=>condition: 驗證成功? respondSuccess=>operation: 響應成功 responseFailure=>operation: 響應失敗 end=>end: 結束start->loginInfo->verifyLogin->isSuccess isSuccess(yes)->respondSuccess->end isSuccess(no)->responseFailure->endstart@>loginInfo({"stroke":"Red"})@>verifyLogin({"stroke":"Red"})@>isSuccess({"stroke":"Red"})@>respondSuccess({"stroke":"Red"})@>end({"stroke":"Red","stroke-width":6,"arrow-end":"classic-wide-long"})

參考鏈接:flowchat

總結

以上是生活随笔為你收集整理的Markdown流程图的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。