sequenceDiagram title: hello autonumber participant B as Browser participant C as Controller participant M as Model participant V as View note left of C: 左note note right of C: 右note note over B, C: 共note B -> C: 实线 activate C C ->> B: 箭头实线 deactivate C %%加号等价于activate M,减号等价于deactivate M C -->+ M: 虚线 M -x+ V: 打叉箭头实线 V --x- M: 打叉箭头虚线 M -->>- C: 箭头虚线 %% 循环 loop 每5分钟 %% Highlight background rect rgba(0, 0, 255, 0.1) V ->> V: 自环 end end loop 每5分钟 B-->>C:汇报 end %% 可选条件 opt 心情好 M-->>V:唱歌 end %% 条件判断 alt Controller没睡 B-->>C:吃宵夜吗 else Model没睡 B-->>M:吃宵夜吗 end %% 并行发送 par Controller to Model C-->>+M:hello? and Controller to View C-->>+V:hello? end %% 并行接收 par Model to Controller M-->>-C:hi! and Model to Controller V-->>-C:hi! end
sequenceDiagram title: hello autonumber participant B as Browser participant C as Controller participant M as Model participant V as View note left of C: 左note note right of C: 右note note over B, C: 共note B -> C: 实线 activate C C ->> B: 箭头实线 deactivate C %%加号等价于activate M,减号等价于deactivate M C -->+ M: 虚线 M -x+ V: 打叉箭头实线 V --x- M: 打叉箭头虚线 M -->>- C: 箭头虚线 %% 循环 loop 每5分钟 %% Highlight background rect rgba(0, 0, 255, 0.1) V ->> V: 自环 end end loop 每5分钟 B-->>C:汇报 end %% 可选条件 opt 心情好 M-->>V:唱歌 end %% 条件判断 alt Controller没睡 B-->>C:吃宵夜吗 else Model没睡 B-->>M:吃宵夜吗 end %% 并行发送 par Controller to Model C-->>+M:hello? and Controller to View C-->>+V:hello? end %% 并行接收 par Model to Controller M-->>-C:hi! and Model to Controller V-->>-C:hi! end
1 2 3 4 5
sequenceDiagram actor Z as 张三 actor L as 李四 Z ->> L: 实线箭头 Z -) L: 实线开放箭头
1 2 3 4 5
sequenceDiagram actor Z as 张三 actor L as 李四 Z ->> L: 实线箭头 Z -) L: 实线开放箭头
甘特图(gantt)
1 2 3 4 5 6 7 8 9
gantt title 研发周期 dateFormat YYYY-MM-DD section 项目 A 项目: A1, 2022-01-01, 30d B 项目: after A1 , 20d section 子任务 子任务1: 2022-01-12 , 12d 子任务2: 24d
1 2 3 4 5 6 7 8 9
gantt title 研发周期 dateFormat YYYY-MM-DD section 项目 A 项目: A1, 2022-01-01, 30d B 项目: after A1 , 20d section 子任务 子任务1: 2022-01-12 , 12d 子任务2: 24d