模块: config 
变量 
defaultConfig 
• Const defaultConfig: MermaidConfig
定义于 
packages/mermaid/src/config.ts:8
函数 
addDirective 
▸ addDirective(directive): void
将指令推送到配置中
参数 
| 名称 | 类型 | 描述 | 
|---|---|---|
| directive | MermaidConfig | 要推入的指令 | 
返回 
void
定义于 
packages/mermaid/src/config.ts:188
getConfig 
▸ getConfig(): MermaidConfig
getConfig 
| 函数 | 描述 | 类型 | 返回值 | 
|---|---|---|---|
| getConfig | 获取当前配置 | 获取请求 | 来自当前配置的任何值 | 
注意: 避免重复调用此函数。 相反,将结果存储在变量中并使用它,并将它传递给函数调用。
返回 
当前配置
定义于 
packages/mermaid/src/config.ts:131
getSiteConfig 
▸ getSiteConfig(): MermaidConfig
getSiteConfig 
| 函数 | 描述 | 类型 | 值 | 
|---|---|---|---|
| setSiteConfig | 返回当前 siteConfig 基础配置 | 获取请求 | 返回 siteConfig 中的任何值 | 
注意: 返回 siteConfig 中的任何值。
返回 
siteConfig
定义于 
packages/mermaid/src/config.ts:96
reset 
▸ reset(config?): void
reset 
| 函数 | 描述 | 类型 | 必需 | 值 | 
|---|---|---|---|---|
| reset | 将 currentConfig 重置为 conf | 置换请求 | 必需 | 无 | 
conf 
| 参数 | 描述 | 类型 | 必需 | 值 | 
|---|---|---|---|---|
| conf | 值的基本集,currentConfig 可以重置到该集。 | 字典 | 必需 | 任何值,相对于安全数组 | 
注意: (默认: 当前 siteConfig ) (可选,默认 getSiteConfig())
参数 
| 名称 | 类型 | 默认值 | 描述 | 
|---|---|---|---|
| config | MermaidConfig | siteConfig | 值的基本集,currentConfig 可以重置到该集。 默认值为当前 siteConfig (例如,由 getSiteConfig 返回)。 | 
返回 
void
定义于 
packages/mermaid/src/config.ts:221
sanitize 
▸ sanitize(options): void
sanitize 
| 函数 | 描述 | 类型 | 值 | 
|---|---|---|---|
| sanitize | 将 siteConfig 设置为所需的值。 | 置换请求 | 无 | 
确保 options 参数不会尝试覆盖 siteConfig 安全键 注意: 会就地修改 options
参数 
| 名称 | 类型 | 描述 | 
|---|---|---|
| options | any | 潜在的 setConfig 参数 | 
返回 
void
定义于 
packages/mermaid/src/config.ts:146
saveConfigFromInitialize 
▸ saveConfigFromInitialize(conf): void
参数 
| 名称 | 类型 | 
|---|---|
| conf | MermaidConfig | 
返回 
void
定义于 
packages/mermaid/src/config.ts:75
setConfig 
▸ setConfig(conf): MermaidConfig
setConfig 
| 函数 | 描述 | 类型 | 值 | 
|---|---|---|---|
| setSiteConfig | 将 siteConfig 设置为所需的值 | 置换请求 | 任何值,除了安全数组中的值 | 
注意: 设置 currentConfig。 参数 conf 会根据 siteConfig.secure 键进行清理。 在 conf 中找到的任何具有 siteConfig.secure 中的键的值都将被替换为相应的 siteConfig 值。
参数 
| 名称 | 类型 | 描述 | 
|---|---|---|
| conf | MermaidConfig | 潜在的 currentConfig | 
返回 
使用清理后的 conf 与 currentConfig 合并的 currentConfig
定义于 
packages/mermaid/src/config.ts:113
setSiteConfig 
▸ setSiteConfig(conf): MermaidConfig
setSiteConfig 
| 函数 | 描述 | 类型 | 值 | 
|---|---|---|---|
| setSiteConfig | 将 siteConfig 设置为所需的值 | 置换请求 | 任何值,除了安全数组中的值 | 
注意: 设置 siteConfig。 siteConfig 是一个受保护的配置,用于重复使用。 对 reset() 的调用将重置 currentConfig 为 siteConfig。 对 reset(configApi.defaultConfig) 的调用将重置 siteConfig 和 currentConfig 为 defaultConfig 注意: currentConfig 在此函数中设置 默认值: 默认情况下,将镜像全局配置
参数 
| 名称 | 类型 | 描述 | 
|---|---|---|
| conf | MermaidConfig | 用作 siteConfig 的基础 currentConfig | 
返回 
新的 siteConfig
定义于 
packages/mermaid/src/config.ts:61
updateCurrentConfig 
▸ updateCurrentConfig(siteCfg, _directives): MermaidConfig
参数 
| 名称 | 类型 | 
|---|---|
| siteCfg | MermaidConfig | 
| _directives | MermaidConfig[] | 
返回 
定义于 
packages/mermaid/src/config.ts:15
updateSiteConfig 
▸ updateSiteConfig(conf): MermaidConfig
参数 
| 名称 | 类型 | 
|---|---|
| conf | MermaidConfig |