markdown 流程图js_MarkDown绘制UML流程图 · 我的博客

flowchat.js{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}st=>start: 开始

e=>end: 结束

op1=>operation: 操作1

op2=>operation: 操作2

sub1=>subroutine: 子程序1

cond=>condition: 条件判断1

c2=>condition: 条件判断2

io=>inputoutput: 输入输出{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}st=>start: 开始

e=>end: 结束

op1=>operation: 操作1

op2=>operation: 操作2

sub1=>subroutine: 子程序1

cond=>condition: 条件判断1

c2=>condition: 条件判断2

io=>inputoutput: 输入输出

st->e

```

### 节点交互

> ** `node1(pos)->node2(pos)` **

pos指定下一个节点出现的位置,默认为该节点下方

* `left`

* `right`

> ** `cond(yes|no)->node` **

> ** `cond(yes|no,left|right)->node` **

### 示例1

```flow

st=>start: Start

e=>end: End

op1=>operation: My Operation

op2=>operation: Stuff

sub1=>subroutine: My Subroutine

cond=>condition: Yes or No?

c2=>condition: Good idea

io=>inputoutput: catch something...

st->op1(right)->cond

cond(yes, right)->c2

cond(no)->sub1(left)->op1

c2(yes)->io->e

c2(no)->op2->e{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}st=>start: Start

e=>end: End

op1=>operation: My Operation

op2=>operation: Stuff

sub1=>subroutine: My Subroutine

cond=>condition: Yes or No?

c2=>condition: Good idea

io=>inputoutput: catch something...

st->op1(right)->cond

cond(yes, right)->c2

cond(no)->sub1(left)->op1

c2(yes)->io->e

c2(no)->op2->e{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}st=>start

e=>end

op1=>operation: My Operation

sub1=>subroutine: My Subroutine

cond=>condition: Yes or No?

io=>inputoutput: catch something...

st->op1->cond

cond(yes)->io->e

cond(no)->sub1(right)->op1{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}st=>start: 开始

e=>end: 结束

op1=>operation: My Operation

sub1=>subroutine: My Subroutine

cond=>condition: Yes or No?

io=>inputoutput: catch something...

st->op1->cond

cond(yes)->io->e

cond(no)->sub1(right)->op1{"scale":1,"line-width":2,"line-length":50,"text-margin":10,"font-size":12,"theme":"simple"}

你可能感兴趣的:(markdown,流程图js)