时序图是使用 js-sequence-diagrams 插件实现的,目前使用的是1.0.4版本,时序图是以 ``seq 开头并以 ` ` 结尾的代码块中。 示例如下:

简单时序图

Andrew->China: Says Hello
Note right of China: China thinks\nabout it
China-->Andrew: How are you?
Andrew->>China: I am good thanks!

解析后如下:

AndrewAndrewChinaChinaSays HelloChina thinksabout itHow are you?I am good thanks!

演示 一

Title: Here is a title
A->B: Normal line
B-->C: Dashed line
C->>D: Open arrow
D-->>A: Dashed open arrow

解析后如下:

Here is a titleHere is a titleAABBCCDDNormal lineDashed lineOpen arrowDashed open arrow

演示二

participant C
participant B
participant A
Note right of A: By listing the participants\n you can change their order

解析后:

CCBBAABy listing the participantsyou can change their order

演示三

# Example of a comment.
Note left of A: Note to the\n left of A
Note right of A: Note to the\n right of A
Note over A: Note over A
Note over A,B: Note over both A and B

解析后:

AABBNote to theleft of ANote to theright of ANote over ANote over both A and B

官网文档: https://bramp.github.io/js-sequence-diagrams/

作者:Mindoc君  创建时间:2022-12-10 16:16
最后编辑:Mindoc君  更新时间:2023-01-09 15:02