主题
Base Diagram Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/BaseDiagramConfig| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|---|---|---|---|---|---|---|---|
| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | config.schema.json* |
BaseDiagramConfig Type
object (Base Diagram Config)
BaseDiagramConfig Properties
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| useWidth | number | Optional | cannot be null | Mermaid Config |
| useMaxWidth | boolean | Optional | cannot be null | Mermaid Config |
| theme | string | Optional | cannot be null | Mermaid Config |
| look | string | Optional | cannot be null | Mermaid Config |
| layout | string | Optional | cannot be null | Mermaid Config |
useWidth
useWidth
is optional
Type:
numbercannot be null
defined in: Mermaid Config
useWidth Type
number
useMaxWidth
当此标志设置为 true 时,高度和宽度设置为 100%,然后使用可用空间缩放。如果设置为 false,则使用所需的绝对空间。
useMaxWidth
is optional
Type:
booleancannot be null
defined in: Mermaid Config
useMaxWidth Type
boolean
useMaxWidth Default Value
The default value is:
json
truetheme
主题,CSS 样式表。你也可以使用 themeCSS 覆盖此值。
theme
is optional
Type:
stringcannot be null
defined in: Mermaid Config
theme Type
string
theme Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"default" | |
"base" | |
"dark" | |
"forest" | |
"neutral" | |
"neo" | |
"neo-dark" | |
"redux" | |
"redux-dark" | |
"redux-color" | |
"redux-dark-color" | |
"null" | Can be set to disable any pre-defined mermaid theme |
look
定义图表要使用的主要外观。
look
is optional
Type:
stringcannot be null
defined in: Mermaid Config
look Type
string
look Constraints
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"classic" | |
"handDrawn" | |
"neo" |
layout
定义用于渲染图表的布局算法。
layout
is optional
Type:
stringcannot be null
defined in: Mermaid Config
layout Type
string