Skip to content

Commit 721f2b9

Browse files
committed
feat(CherryMarkdown): add locale parameter
1 parent ebc9206 commit 721f2b9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/BootstrapBlazor.CherryMarkdown/Components/CherryMarkdown/CherryMarkdown.razor.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ public partial class CherryMarkdown
6666
[Parameter]
6767
public bool IsViewer { get; set; }
6868

69+
/// <summary>
70+
/// 获取/设置 组件语言
71+
/// </summary>
72+
[Parameter]
73+
public string Locale { get; set; } = "zh-CN";
74+
6975
/// <summary>
7076
/// <inheritdoc/>
7177
/// </summary>
@@ -93,7 +99,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
9399
/// </summary>
94100
/// <returns></returns>
95101
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop,
96-
new { Value, IsSupportMath, IsViewer, Editor = EditorSettings ?? new(), Toolbars = ToolbarSettings ?? new() },
102+
new { Value, IsSupportMath, IsViewer, Locale, Editor = EditorSettings ?? new(), Toolbars = ToolbarSettings ?? new() },
97103
nameof(Upload));
98104

99105
/// <summary>

0 commit comments

Comments
 (0)