Skip to content

Commit ec0df3b

Browse files
committed
refactor: 更正 Invoke 参数顺序
1 parent 57e1dca commit ec0df3b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/BootstrapBlazor.Vditor/Vditor.razor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
9292
if (_lastValue != Value)
9393
{
9494
_lastValue = Value;
95-
await InvokeVoidAsync(Id, "setValue", Value);
95+
await InvokeVoidAsync("setValue", Id, Value);
9696
}
9797
}
9898

@@ -132,19 +132,19 @@ public async Task Reset(string value, VditorOptions options)
132132
/// <para lang="zh">获取编辑器的 Markdown 内容</para>
133133
/// <para lang="en">Gets the markdown content of the editor.</para>
134134
/// </summary>
135-
public Task<string?> GetValueAsync() => InvokeAsync<string?>("execute", Id, "getValue");
135+
public Task<string?> GetValueAsync() => InvokeAsync<string?>("getResult", Id, "getValue");
136136

137137
/// <summary>
138138
/// <para lang="zh">获取 Markdown 渲染后的 HTML</para>
139139
/// <para lang="en">Gets the HTML rendered from markdown.</para>
140140
/// </summary>
141-
public Task<string?> GetHtmlAsync() => InvokeAsync<string?>("execute", Id, "getHTML");
141+
public Task<string?> GetHtmlAsync() => InvokeAsync<string?>("getResult", Id, "getHTML");
142142

143143
/// <summary>
144-
/// <para lang="zh">返回选中的字符串</para>
144+
/// <para lang="zh">获取 返回选中的字符串</para>
145145
/// <para lang="en">Returns the selected string.</para>
146146
/// </summary>
147-
public Task<string?> GetSelectionAsync() => InvokeAsync<string?>("execute", Id, "getSelection");
147+
public Task<string?> GetSelectionAsync() => InvokeAsync<string?>("getResult", Id, "getSelection");
148148

149149
/// <summary>
150150
/// <para lang="zh">解除编辑器禁用</para>

0 commit comments

Comments
 (0)