当前位置: 首页 > news >正文

深入解析:VSCODE, mermaid 示例

深入解析:VSCODE, mermaid 示例

VSCODE,ctrl+shift+v

Mermaid 是一种使用文本生成流程图、饼状图、甘特图等图表的描述语言,它可以帮助用户以简单、直观的方式创建各种类型的图表,包括流程图、时序图、甘特图等。

1)

```mermaid
graph LRA-->B;B-->C;C-->D;
```

2)

```mermaid
sequenceDiagramA->>B: Message 1B-->>A: Message 2
```

3)

4)

4)

```mermaid  

graph LR

    A --> B

    B --> C

    C --> D

    subgraph Subgraph A

        B1 --> C1

        C1 --> D1

    end

    subgraph Subgraph B

        B2 --> C2

        C2 --> D2

    end

```

图截不完

5)

pietitle Example Pie Chart"Apples" : 45.0"Oranges" : 25.0"Bananas" : 15.0"Grapes" : 10.0"Pears" : 5.0

6)

```mermaid  

graph LR;

  A[Square] --> B((Circle));

  C(Rectangle) --> D{Diamond};

  style A fill:#f9c;

  style B stroke:#333,stroke-width:4px;

  style C fill:#f96,stroke:#333,stroke-width:2px;

  style D fill:#fc9,stroke:#f63,stroke-width:4px,stroke-dasharray: 5 5;

```

7)

```mermaid  

graph LR;

  A[Square] --> B((Circle));

  C(Rectangle) --> D{Diamond};

  style A fill:#f9c, width:80px, height:60px;

  style B stroke:#333,stroke-width:4px, width:60px, height:60px;

  style C fill:#f96,stroke:#333,stroke-width:2px, width:100px, height:80px;

  style D fill:#fc9,stroke:#f63,stroke-width:4px,stroke-dasharray: 5 5, width:80px, height:80px;

```

8)

```mermaid  

graph TD;

    A-->B;

    A-->C;

    B-->D;

    C-->D;

```

9)

```mermaid  

flowchart LR

    A[Hard edge] -->|Link text| B(Round edge)

    B --> C{Decision}

    C -->|One| D[Result one]

    C -->|Two| E[Result two]

```

10)

```mermaid  

flowchart LR

    id1(Start)-->id2(Stop)

    style id1 fill:#f9f,stroke:#333,stroke-width:4px

    style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5

```

11)

```mermaid  

sequenceDiagram

    participant Alice

    participant Bob

    Alice->>John: Hello John, how are you?

    loop Healthcheck

        John->>John: Fight against hypochondria

    end

    Note right of John: Rational thoughts <br/>prevail!

    John-->>Alice: Great!

    John->>Bob: How about you?

    Bob-->>John: Jolly good!

```

11)

```mermaid  

sequenceDiagram

    participant Alice

    participant John

    rect rgb(191, 223, 255)

    note right of Alice: Alice calls John.

    Alice->>+John: Hello John, how are you?

    rect rgb(200, 150, 255)

    Alice->>+John: John, can you hear me?

    John-->>-Alice: Hi Alice, I can hear you!

    end

    John-->>-Alice: I feel great!

    end

    Alice ->>+ John: Did you want to go to the game tonight?

    John -->>- Alice: Yeah! See you there.

```

12)

```mermaid  

classDiagram

Class01 <|-- AveryLongClass : Cool

Class03 *-- Class04

Class05 o-- Class06

Class07 .. Class08

Class09 --> C2 : Where am i?

Class09 --* C3

Class09 --|> Class07

Class07 : equals()

Class07 : Object[] elementData

Class01 : size()

Class01 : int chimp

Class01 : int gorilla

Class08 <--> C2: Cool label


```

13)

```mermaid  

classDiagram

classA <|-- classB

classC *-- classD

classE o-- classF

classG <-- classH

classI -- classJ

classK <.. classL

classM <|.. classN

classO .. classP


```

14)

```mermaid  

stateDiagram

   direction TB

   accTitle: This is the accessible title

   accDescr: This is an accessible description

   classDef notMoving fill:white

   classDef movement font-style:italic;

   classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow

   [*] --> Still:::notMoving

   Still --> [*]

   Still --> Moving:::movement

   Moving --> Still

   Moving --> Crash:::movement

   Crash:::badBadEvent --> [*]


```

16)

```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


```

17)

```mermaid  

mindmap

  root((mindmap))

    Origins

      Long history

      ::icon(fa fa-book)

      Popularisation

        British popular psychology author Tony Buzan

    Research

      On effectiveness<br/>and features

      On Automatic creation

        Uses

            Creative techniques

            Strategic planning

            Argument mapping

    Tools

      Pen and paper

      Mermaid


```

18)

http://www.jsqmd.com/news/386999/

相关文章:

  • 参展商最多的建材展会有哪些?2026五大核心展会全攻略|掘金万亿市场 - 匠言榜单
  • 2026年评价高的包装画册印刷/酒盒画册印刷制造厂家实力参考哪家专业 - 行业平台推荐
  • 让AI代理演示他们的工作
  • 2026年比较好的双主轴数控车床/精密线规数控车床哪家专业工厂直供推荐 - 品牌宣传支持者
  • 2026年评价高的三节同步阻尼托底轨/三维调节阻尼托底轨如何选畅销厂家采购指南 - 行业平台推荐
  • AI代理的两种沙盒架构
  • OWASP ZAP深度解析
  • 2026年热门的不锈钢金属波纹管设备/预应力金属波纹管设备四波机品牌厂家推荐哪家强 - 品牌宣传支持者
  • OBS正确录制整个桌面
  • 2026年比较好的缓冲一字铰链/厚薄门通用一字铰链哪家专业工厂直供推荐 - 行业平台推荐
  • StrongDM:软件黑灯工厂
  • 2026年质量好的驻车加热通风管设备/新能源驻车加热通风管设备供应商推荐怎么联系(畅销) - 品牌宣传支持者
  • axe-core深度解析
  • P2036 PERKET
  • 本科生必看!全网爆红的降AI率软件 —— 千笔AI
  • 2026年知名的缓冲钢珠轨/静音钢珠轨怎么选实力厂家推荐 - 行业平台推荐
  • 2026年比较好的三节连动缓冲托底轨/两节缓冲托底轨热门品牌推荐口碑排行 - 行业平台推荐
  • 导师严选!全网爆红的AI论文写作软件 —— 千笔·专业论文写作工具
  • 2026年靠谱的圆形别墅电梯源头直供参考哪家便宜 - 行业平台推荐
  • 2026年知名的干湿联合闭式冷却塔/密闭式冷却塔生产厂家实力参考哪家强(更新) - 行业平台推荐
  • 真心不骗你!AI论文写作软件 千笔AI VS speedai,专为本科生量身打造!
  • 导师推荐!标杆级的降AIGC软件 —— 千笔·降AI率助手
  • 中老年关节保健:氨糖常见的品牌有哪些(2026口碑榜) - 品牌排行榜
  • 深度测评 一键生成论文工具 千笔ai写作 VS 灵感ai,专科生专属
  • 2026年热门的成都集装箱移动房屋/成都集装箱租售口碑排行实力厂家口碑参考 - 品牌宣传支持者
  • 2026年靠谱的圆形电梯家用/全圆形电梯畅销厂家采购指南如何选 - 行业平台推荐
  • 2026年比较好的集肤发热电缆/地暖发热电缆哪家专业制造厂家实力参考 - 品牌宣传支持者
  • 2026年质量好的PVC卡发卡机/智能卡发卡机哪家便宜源头直供参考(真实参考) - 品牌宣传支持者
  • 2026年口碑好的系统门窗/铝木系系统门窗制造厂家推荐哪家靠谱 - 行业平台推荐
  • 2026年热门的低温电伴热带/恒功率电伴热带怎么联系供应商推荐 - 品牌宣传支持者