Skip to content

TreeView Diagram Config Schema

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/TreeViewDiagramConfig

包含针对 treeView 图表的特定配置的对象。

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

TreeViewDiagramConfig Type

object (TreeView Diagram Config)

all of

TreeViewDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
rowIndentnumberOptionalcannot be nullMermaid Config
paddingXnumberOptionalcannot be nullMermaid Config
paddingYnumberOptionalcannot be nullMermaid Config
lineThicknessnumberOptionalcannot be nullMermaid Config
showIconsbooleanOptionalcannot be nullMermaid Config
defaultIconPackstringOptionalcannot be nullMermaid Config
filenameIconsobjectOptionalcannot be nullMermaid Config
extensionIconsobjectOptionalcannot be nullMermaid Config

rowIndent

相差一级的行间水平距离

rowIndent

rowIndent Type

number

rowIndent Constraints

minimum: the value of this number must greater than or equal to: 0

rowIndent Default Value

The default value is:

json
10

paddingX

标签的水平内边距

paddingX

paddingX Type

number

paddingX Constraints

minimum: the value of this number must greater than or equal to: 0

paddingX Default Value

The default value is:

json
5

paddingY

标签的垂直内边距

paddingY

paddingY Type

number

paddingY Constraints

minimum: the value of this number must greater than or equal to: 0

paddingY Default Value

The default value is:

json
5

lineThickness

线条的厚度

lineThickness

lineThickness Type

number

lineThickness Constraints

minimum: the value of this number must greater than or equal to: 0

lineThickness Default Value

The default value is:

json
1

showIcons

是否在标签旁显示默认的文件/文件夹图标。明确的 icon() 注释始终会渲染,无论此设置如何。

showIcons

showIcons Type

boolean

showIcons Default Value

The default value is:

json
false

defaultIconPack

用于解析未加前缀图标引用的已注册 Iconify 包名称 — icon(name) 注释和 filenameIcons/ extensionIcons values without a pack: prefix. The pack must be registered with registerIconPacks. When empty, unprefixed names resolve to the built-in file/folder icons.

defaultIconPack

defaultIconPack Type

string

defaultIconPack Default Value

The default value is:

json
""

filenameIcons

精确文件名 → 图标映射,用于在启用 showIcons 时选择文件的图标,例如。 { "Dockerfile": "material-icon-theme:docker" }. Values are resolved like icon() references: pack:name is used as-is, unprefixed names resolve via defaultIconPack, and none hides the icon for matching files.

filenameIcons

filenameIcons Type

object (Details)

filenameIcons Default Value

The default value is:

json
{}

extensionIcons

文件扩展名 → 图标映射,用于在启用 showIcons 时选择文件的图标,例如 { ".ts": "material-icon-theme:typescript" }. Keys are lowercase and may include or omit the leading dot. Values are resolved like icon() references: pack:name is used as-is, unprefixed names resolve via defaultIconPack, and none hides the icon for matching files.

extensionIcons

extensionIcons Type

object (Details)

extensionIcons Default Value

The default value is:

json
{}
Opens in mermaid.ai