chore(lib): update mermaid 9.0.1 -> 9.1.0 and docs
This commit is contained in:
@@ -43,8 +43,8 @@ libFiles:
|
|||||||
katexCopyTexCSS: katex@0.15.3/dist/contrib/copy-tex.min.css
|
katexCopyTexCSS: katex@0.15.3/dist/contrib/copy-tex.min.css
|
||||||
katexCopyTexJS: katex@0.15.3/dist/contrib/copy-tex.min.js
|
katexCopyTexJS: katex@0.15.3/dist/contrib/copy-tex.min.js
|
||||||
katexMhchemJS: katex@0.15.3/dist/contrib/mhchem.min.js
|
katexMhchemJS: katex@0.15.3/dist/contrib/mhchem.min.js
|
||||||
# mermaid@9.0.1 https://github.com/mermaid-js/mermaid
|
# mermaid@9.1.0 https://github.com/mermaid-js/mermaid
|
||||||
mermaidJS: mermaid@9.0.1/dist/mermaid.min.js
|
mermaidJS: mermaid@9.1.0/dist/mermaid.min.js
|
||||||
# echarts@5.3.2 https://echarts.apache.org/
|
# echarts@5.3.2 https://echarts.apache.org/
|
||||||
echartsJS: echarts@5.3.2/dist/echarts.min.js
|
echartsJS: echarts@5.3.2/dist/echarts.min.js
|
||||||
# mapbox-gl@2.8.2 https://docs.mapbox.com/mapbox-gl-js
|
# mapbox-gl@2.8.2 https://docs.mapbox.com/mapbox-gl-js
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ clipboard.js@2.0.11 https://github.com/zenorocha/clipboard.js
|
|||||||
sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
|
sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
|
||||||
typeit@8.5.4 https://github.com/alexmacarthur/typeit
|
typeit@8.5.4 https://github.com/alexmacarthur/typeit
|
||||||
katex@0.15.3 https://katex.org/
|
katex@0.15.3 https://katex.org/
|
||||||
mermaid@9.0.1 https://github.com/mermaid-js/mermaid
|
mermaid@9.1.0 https://github.com/mermaid-js/mermaid
|
||||||
echarts@5.3.2 https://echarts.apache.org/
|
echarts@5.3.2 https://echarts.apache.org/
|
||||||
mapbox-gl@2.8.2 https://github.com/mapbox/mapbox-gl-js
|
mapbox-gl@2.8.2 https://github.com/mapbox/mapbox-gl-js
|
||||||
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||||
|
|||||||
2
assets/lib/mermaid/mermaid.min.js
vendored
2
assets/lib/mermaid/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -26,7 +26,7 @@ The `mermaid` shortcode supports diagrams in Hugo with [Mermaid](https://mermaid
|
|||||||
|
|
||||||
Just insert your mermaid code in the `mermaid` shortcode and that’s it.
|
Just insert your mermaid code in the `mermaid` shortcode and that’s it.
|
||||||
|
|
||||||
## 1 Flowchart {#flowchart}
|
## Flowchart {#flowchart}
|
||||||
|
|
||||||
Example **flowchart** `mermaid` input:
|
Example **flowchart** `mermaid` input:
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ graph LR;
|
|||||||
C -->|Two| E[Result two]
|
C -->|Two| E[Result two]
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 2 Sequence Diagram {#sequence-diagram}
|
## Sequence Diagram {#sequence-diagram}
|
||||||
|
|
||||||
Example **sequence diagram** `mermaid` input:
|
Example **sequence diagram** `mermaid` input:
|
||||||
|
|
||||||
@@ -86,27 +86,22 @@ sequenceDiagram
|
|||||||
Bob-->John: Jolly good!
|
Bob-->John: Jolly good!
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 3 GANTT {#gantt}
|
## Gantt {#gantt}
|
||||||
|
|
||||||
Example **GANTT** `mermaid` input:
|
Example **Gantt** `mermaid` input:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
gantt
|
gantt
|
||||||
dateFormat YYYY-MM-DD
|
dateFormat YYYY-MM-DD
|
||||||
title Adding GANTT diagram functionality to mermaid
|
title Adding GANTT diagram to mermaid
|
||||||
section A section
|
excludes weekdays 2014-01-10
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
section A section
|
||||||
Future task : des3, after des2, 5d
|
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||||
Future task2 : des4, after des3, 5d
|
Active task :active, des2, 2014-01-09, 3d
|
||||||
section Critical tasks
|
Future task : des3, after des2, 5d
|
||||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
Future task2 : des4, after des3, 5d
|
||||||
Implement parser and jison :crit, done, after des1, 2d
|
|
||||||
Create tests for parser :crit, active, 3d
|
|
||||||
Future task in critical line :crit, 5d
|
|
||||||
Create tests for renderer :2d
|
|
||||||
Add to mermaid :1d
|
|
||||||
{{</* /mermaid */>}}
|
{{</* /mermaid */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -114,42 +109,44 @@ The rendered output looks like this:
|
|||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
gantt
|
gantt
|
||||||
dateFormat YYYY-MM-DD
|
dateFormat YYYY-MM-DD
|
||||||
title Adding GANTT diagram functionality to mermaid
|
title Adding GANTT diagram to mermaid
|
||||||
section A section
|
excludes weekdays 2014-01-10
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
section A section
|
||||||
Future task : des3, after des2, 5d
|
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||||
Future task2 : des4, after des3, 5d
|
Active task :active, des2, 2014-01-09, 3d
|
||||||
section Critical tasks
|
Future task : des3, after des2, 5d
|
||||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
Future task2 : des4, after des3, 5d
|
||||||
Implement parser and jison :crit, done, after des1, 2d
|
|
||||||
Create tests for parser :crit, active, 3d
|
|
||||||
Future task in critical line :crit, 5d
|
|
||||||
Create tests for renderer :2d
|
|
||||||
Add to mermaid :1d
|
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 4 Class Diagram {#class-diagram}
|
## Class Diagram {#class-diagram}
|
||||||
|
|
||||||
Example **class diagram** `mermaid` input:
|
Example **class diagram** `mermaid` input:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
classDiagram
|
classDiagram
|
||||||
Class01 <|-- AveryLongClass : Cool
|
Animal <|-- Duck
|
||||||
Class03 *-- Class04
|
Animal <|-- Fish
|
||||||
Class05 o-- Class06
|
Animal <|-- Zebra
|
||||||
Class07 .. Class08
|
Animal : +int age
|
||||||
Class09 --> C2 : Where am i?
|
Animal : +String gender
|
||||||
Class09 --* C3
|
Animal: +isMammal()
|
||||||
Class09 --|> Class07
|
Animal: +mate()
|
||||||
Class07 : equals()
|
class Duck{
|
||||||
Class07 : Object[] elementData
|
+String beakColor
|
||||||
Class01 : size()
|
+swim()
|
||||||
Class01 : int chimp
|
+quack()
|
||||||
Class01 : int gorilla
|
}
|
||||||
Class08 <--> C2: Cool label
|
class Fish{
|
||||||
|
-int sizeInFeet
|
||||||
|
-canEat()
|
||||||
|
}
|
||||||
|
class Zebra{
|
||||||
|
+bool is_wild
|
||||||
|
+run()
|
||||||
|
}
|
||||||
{{</* /mermaid */>}}
|
{{</* /mermaid */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -157,28 +154,35 @@ The rendered output looks like this:
|
|||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
classDiagram
|
classDiagram
|
||||||
Class01 <|-- AveryLongClass : Cool
|
Animal <|-- Duck
|
||||||
Class03 *-- Class04
|
Animal <|-- Fish
|
||||||
Class05 o-- Class06
|
Animal <|-- Zebra
|
||||||
Class07 .. Class08
|
Animal : +int age
|
||||||
Class09 --> C2 : Where am i?
|
Animal : +String gender
|
||||||
Class09 --* C3
|
Animal: +isMammal()
|
||||||
Class09 --|> Class07
|
Animal: +mate()
|
||||||
Class07 : equals()
|
class Duck{
|
||||||
Class07 : Object[] elementData
|
+String beakColor
|
||||||
Class01 : size()
|
+swim()
|
||||||
Class01 : int chimp
|
+quack()
|
||||||
Class01 : int gorilla
|
}
|
||||||
Class08 <--> C2: Cool label
|
class Fish{
|
||||||
|
-int sizeInFeet
|
||||||
|
-canEat()
|
||||||
|
}
|
||||||
|
class Zebra{
|
||||||
|
+bool is_wild
|
||||||
|
+run()
|
||||||
|
}
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 5 State Diagram {#state-diagram}
|
## State Diagram {#state-diagram}
|
||||||
|
|
||||||
Example **state diagram** `mermaid` input:
|
Example **state diagram** `mermaid` input:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
stateDiagram
|
stateDiagram-v2
|
||||||
[*] --> Still
|
[*] --> Still
|
||||||
Still --> [*]
|
Still --> [*]
|
||||||
Still --> Moving
|
Still --> Moving
|
||||||
@@ -191,7 +195,7 @@ stateDiagram
|
|||||||
The rendered output looks like this:
|
The rendered output looks like this:
|
||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
stateDiagram
|
stateDiagram-v2
|
||||||
[*] --> Still
|
[*] --> Still
|
||||||
Still --> [*]
|
Still --> [*]
|
||||||
Still --> Moving
|
Still --> Moving
|
||||||
@@ -200,7 +204,7 @@ stateDiagram
|
|||||||
Crash --> [*]
|
Crash --> [*]
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 6 Git Graph {#git-graph}
|
## Git Graph {#git-graph}
|
||||||
|
|
||||||
Example **git graph** `mermaid` input:
|
Example **git graph** `mermaid` input:
|
||||||
|
|
||||||
@@ -236,9 +240,63 @@ gitGraph
|
|||||||
commit
|
commit
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 7 Pie {#pie}
|
## Entity Relationship Diagram {#entity-relationship-diagram}
|
||||||
|
|
||||||
Example **pie** `mermaid` input:
|
Example **entity-relationship diagram** `mermaid` input:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--o{ ORDER : places
|
||||||
|
ORDER ||--|{ LINE-ITEM : contains
|
||||||
|
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
The rendered output looks like this:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--o{ ORDER : places
|
||||||
|
ORDER ||--|{ LINE-ITEM : contains
|
||||||
|
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## User Journey {#user-journey}
|
||||||
|
|
||||||
|
Example **user journey** `mermaid` input:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
journey
|
||||||
|
title My working day
|
||||||
|
section Go to work
|
||||||
|
Make tea: 5: Me
|
||||||
|
Go upstairs: 3: Me
|
||||||
|
Do work: 1: Me, Cat
|
||||||
|
section Go home
|
||||||
|
Go downstairs: 5: Me
|
||||||
|
Sit down: 5: Me
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
The rendered output looks like this:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
journey
|
||||||
|
title My working day
|
||||||
|
section Go to work
|
||||||
|
Make tea: 5: Me
|
||||||
|
Go upstairs: 3: Me
|
||||||
|
Do work: 1: Me, Cat
|
||||||
|
section Go home
|
||||||
|
Go downstairs: 5: Me
|
||||||
|
Sit down: 5: Me
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## Pie Chart {#pie-chart}
|
||||||
|
|
||||||
|
Example **pie chart** `mermaid` input:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
@@ -257,3 +315,45 @@ pie
|
|||||||
"Cats" : 85
|
"Cats" : 85
|
||||||
"Rats" : 15
|
"Rats" : 15
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## Requirement Diagram {#requirement-diagram}
|
||||||
|
|
||||||
|
Example **requirement diagram** `mermaid` input:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
requirementDiagram
|
||||||
|
|
||||||
|
requirement test_req {
|
||||||
|
id: 1
|
||||||
|
text: the test text.
|
||||||
|
risk: high
|
||||||
|
verifymethod: test
|
||||||
|
}
|
||||||
|
|
||||||
|
element test_entity {
|
||||||
|
type: simulation
|
||||||
|
}
|
||||||
|
|
||||||
|
test_entity - satisfies -> test_req
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
The rendered output looks like this:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
requirementDiagram
|
||||||
|
|
||||||
|
requirement test_req {
|
||||||
|
id: 1
|
||||||
|
text: the test text.
|
||||||
|
risk: high
|
||||||
|
verifymethod: test
|
||||||
|
}
|
||||||
|
|
||||||
|
element test_entity {
|
||||||
|
type: simulation
|
||||||
|
}
|
||||||
|
|
||||||
|
test_entity - satisfies -> test_req
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ hiddenFromHomePage: true
|
|||||||
|
|
||||||
只需将你的 mermaid 代码插入 `mermaid` shortcode 中即可.
|
只需将你的 mermaid 代码插入 `mermaid` shortcode 中即可.
|
||||||
|
|
||||||
## 1 流程图 {#flowchart}
|
## 流程图 {#flowchart}
|
||||||
|
|
||||||
一个 **流程图** `mermaid` 示例:
|
一个 **流程图** `mermaid` 示例:
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ graph LR;
|
|||||||
C -->|Two| E[Result two]
|
C -->|Two| E[Result two]
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 2 时序图 {#sequence-diagram}
|
## 时序图 {#sequence-diagram}
|
||||||
|
|
||||||
一个 **时序图** `mermaid` 示例:
|
一个 **时序图** `mermaid` 示例:
|
||||||
|
|
||||||
@@ -86,27 +86,22 @@ sequenceDiagram
|
|||||||
Bob-->John: Jolly good!
|
Bob-->John: Jolly good!
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 3 甘特图 {#gantt}
|
## 甘特图 {#gantt}
|
||||||
|
|
||||||
一个 **甘特图** `mermaid` 示例:
|
一个 **甘特图** `mermaid` 示例:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
gantt
|
gantt
|
||||||
dateFormat YYYY-MM-DD
|
dateFormat YYYY-MM-DD
|
||||||
title Adding GANTT diagram functionality to mermaid
|
title Adding GANTT diagram to mermaid
|
||||||
section A section
|
excludes weekdays 2014-01-10
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
section A section
|
||||||
Future task : des3, after des2, 5d
|
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||||
Future task2 : des4, after des3, 5d
|
Active task :active, des2, 2014-01-09, 3d
|
||||||
section Critical tasks
|
Future task : des3, after des2, 5d
|
||||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
Future task2 : des4, after des3, 5d
|
||||||
Implement parser and jison :crit, done, after des1, 2d
|
|
||||||
Create tests for parser :crit, active, 3d
|
|
||||||
Future task in critical line :crit, 5d
|
|
||||||
Create tests for renderer :2d
|
|
||||||
Add to mermaid :1d
|
|
||||||
{{</* /mermaid */>}}
|
{{</* /mermaid */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -114,42 +109,44 @@ gantt
|
|||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
gantt
|
gantt
|
||||||
dateFormat YYYY-MM-DD
|
dateFormat YYYY-MM-DD
|
||||||
title Adding GANTT diagram functionality to mermaid
|
title Adding GANTT diagram to mermaid
|
||||||
section A section
|
excludes weekdays 2014-01-10
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
section A section
|
||||||
Future task : des3, after des2, 5d
|
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||||
Future task2 : des4, after des3, 5d
|
Active task :active, des2, 2014-01-09, 3d
|
||||||
section Critical tasks
|
Future task : des3, after des2, 5d
|
||||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
Future task2 : des4, after des3, 5d
|
||||||
Implement parser and jison :crit, done, after des1, 2d
|
|
||||||
Create tests for parser :crit, active, 3d
|
|
||||||
Future task in critical line :crit, 5d
|
|
||||||
Create tests for renderer :2d
|
|
||||||
Add to mermaid :1d
|
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 4 类图 {#class-diagram}
|
## 类图 {#class-diagram}
|
||||||
|
|
||||||
一个 **类图** `mermaid` 示例:
|
一个 **类图** `mermaid` 示例:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
classDiagram
|
classDiagram
|
||||||
Class01 <|-- AveryLongClass : Cool
|
Animal <|-- Duck
|
||||||
Class03 *-- Class04
|
Animal <|-- Fish
|
||||||
Class05 o-- Class06
|
Animal <|-- Zebra
|
||||||
Class07 .. Class08
|
Animal : +int age
|
||||||
Class09 --> C2 : Where am i?
|
Animal : +String gender
|
||||||
Class09 --* C3
|
Animal: +isMammal()
|
||||||
Class09 --|> Class07
|
Animal: +mate()
|
||||||
Class07 : equals()
|
class Duck{
|
||||||
Class07 : Object[] elementData
|
+String beakColor
|
||||||
Class01 : size()
|
+swim()
|
||||||
Class01 : int chimp
|
+quack()
|
||||||
Class01 : int gorilla
|
}
|
||||||
Class08 <--> C2: Cool label
|
class Fish{
|
||||||
|
-int sizeInFeet
|
||||||
|
-canEat()
|
||||||
|
}
|
||||||
|
class Zebra{
|
||||||
|
+bool is_wild
|
||||||
|
+run()
|
||||||
|
}
|
||||||
{{</* /mermaid */>}}
|
{{</* /mermaid */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -157,28 +154,35 @@ classDiagram
|
|||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
classDiagram
|
classDiagram
|
||||||
Class01 <|-- AveryLongClass : Cool
|
Animal <|-- Duck
|
||||||
Class03 *-- Class04
|
Animal <|-- Fish
|
||||||
Class05 o-- Class06
|
Animal <|-- Zebra
|
||||||
Class07 .. Class08
|
Animal : +int age
|
||||||
Class09 --> C2 : Where am i?
|
Animal : +String gender
|
||||||
Class09 --* C3
|
Animal: +isMammal()
|
||||||
Class09 --|> Class07
|
Animal: +mate()
|
||||||
Class07 : equals()
|
class Duck{
|
||||||
Class07 : Object[] elementData
|
+String beakColor
|
||||||
Class01 : size()
|
+swim()
|
||||||
Class01 : int chimp
|
+quack()
|
||||||
Class01 : int gorilla
|
}
|
||||||
Class08 <--> C2: Cool label
|
class Fish{
|
||||||
|
-int sizeInFeet
|
||||||
|
-canEat()
|
||||||
|
}
|
||||||
|
class Zebra{
|
||||||
|
+bool is_wild
|
||||||
|
+run()
|
||||||
|
}
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 5 状态图 {#state-diagram}
|
## 状态图 {#state-diagram}
|
||||||
|
|
||||||
一个 **状态图** `mermaid` 示例:
|
一个 **状态图** `mermaid` 示例:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid */>}}
|
||||||
stateDiagram
|
stateDiagram-v2
|
||||||
[*] --> Still
|
[*] --> Still
|
||||||
Still --> [*]
|
Still --> [*]
|
||||||
Still --> Moving
|
Still --> Moving
|
||||||
@@ -191,7 +195,7 @@ stateDiagram
|
|||||||
呈现的输出效果如下:
|
呈现的输出效果如下:
|
||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
stateDiagram
|
stateDiagram-v2
|
||||||
[*] --> Still
|
[*] --> Still
|
||||||
Still --> [*]
|
Still --> [*]
|
||||||
Still --> Moving
|
Still --> Moving
|
||||||
@@ -200,7 +204,7 @@ stateDiagram
|
|||||||
Crash --> [*]
|
Crash --> [*]
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 6 Git 图 {#git-graph}
|
## Git 图 {#git-graph}
|
||||||
|
|
||||||
一个 **Git 图** `mermaid` 示例:
|
一个 **Git 图** `mermaid` 示例:
|
||||||
|
|
||||||
@@ -236,7 +240,61 @@ gitGraph
|
|||||||
commit
|
commit
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
## 7 饼图 {#pie}
|
## 实体关系图 {#entity-relationship-diagram}
|
||||||
|
|
||||||
|
一个 **实体关系图** `mermaid` 示例:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--o{ ORDER : places
|
||||||
|
ORDER ||--|{ LINE-ITEM : contains
|
||||||
|
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
呈现的输出效果如下:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
erDiagram
|
||||||
|
CUSTOMER ||--o{ ORDER : places
|
||||||
|
ORDER ||--|{ LINE-ITEM : contains
|
||||||
|
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## 用户体验旅程图 {#user-journey}
|
||||||
|
|
||||||
|
一个 **用户体验旅程图** `mermaid` 示例:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
journey
|
||||||
|
title My working day
|
||||||
|
section Go to work
|
||||||
|
Make tea: 5: Me
|
||||||
|
Go upstairs: 3: Me
|
||||||
|
Do work: 1: Me, Cat
|
||||||
|
section Go home
|
||||||
|
Go downstairs: 5: Me
|
||||||
|
Sit down: 5: Me
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
呈现的输出效果如下:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
journey
|
||||||
|
title My working day
|
||||||
|
section Go to work
|
||||||
|
Make tea: 5: Me
|
||||||
|
Go upstairs: 3: Me
|
||||||
|
Do work: 1: Me, Cat
|
||||||
|
section Go home
|
||||||
|
Go downstairs: 5: Me
|
||||||
|
Sit down: 5: Me
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## 饼图 {#pie}
|
||||||
|
|
||||||
一个 **饼图** `mermaid` 示例:
|
一个 **饼图** `mermaid` 示例:
|
||||||
|
|
||||||
@@ -257,3 +315,45 @@ pie
|
|||||||
"Cats" : 85
|
"Cats" : 85
|
||||||
"Rats" : 15
|
"Rats" : 15
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
|
## 依赖图 {#requirement-diagram}
|
||||||
|
|
||||||
|
一个 **依赖图** `mermaid` 示例:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
{{</* mermaid */>}}
|
||||||
|
requirementDiagram
|
||||||
|
|
||||||
|
requirement test_req {
|
||||||
|
id: 1
|
||||||
|
text: the test text.
|
||||||
|
risk: high
|
||||||
|
verifymethod: test
|
||||||
|
}
|
||||||
|
|
||||||
|
element test_entity {
|
||||||
|
type: simulation
|
||||||
|
}
|
||||||
|
|
||||||
|
test_entity - satisfies -> test_req
|
||||||
|
{{</* /mermaid */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
呈现的输出效果如下:
|
||||||
|
|
||||||
|
{{< mermaid >}}
|
||||||
|
requirementDiagram
|
||||||
|
|
||||||
|
requirement test_req {
|
||||||
|
id: 1
|
||||||
|
text: the test text.
|
||||||
|
risk: high
|
||||||
|
verifymethod: test
|
||||||
|
}
|
||||||
|
|
||||||
|
element test_entity {
|
||||||
|
type: simulation
|
||||||
|
}
|
||||||
|
|
||||||
|
test_entity - satisfies -> test_req
|
||||||
|
{{< /mermaid >}}
|
||||||
|
|||||||
Reference in New Issue
Block a user