Skip to content

Commit 57e1dca

Browse files
committed
refactor: 增加 Id 参数
1 parent 74e9423 commit 57e1dca

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,43 +132,43 @@ 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", "getValue");
135+
public Task<string?> GetValueAsync() => InvokeAsync<string?>("execute", 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", "getHTML");
141+
public Task<string?> GetHtmlAsync() => InvokeAsync<string?>("execute", Id, "getHTML");
142142

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

149149
/// <summary>
150150
/// <para lang="zh">解除编辑器禁用</para>
151151
/// <para lang="en">Enables the editor.</para>
152152
/// </summary>
153-
public Task EnableAsync() => InvokeVoidAsync("execute", "enable");
153+
public Task EnableAsync() => InvokeVoidAsync("execute", Id, "enable");
154154

155155
/// <summary>
156156
/// <para lang="zh">禁用编辑器</para>
157157
/// <para lang="en">Disables the editor.</para>
158158
/// </summary>
159-
public Task DisableAsync() => InvokeVoidAsync("execute", "disabled");
159+
public Task DisableAsync() => InvokeVoidAsync("execute", Id, "disabled");
160160

161161
/// <summary>
162162
/// <para lang="zh">聚焦编辑器</para>
163163
/// <para lang="en">Focuses the editor.</para>
164164
/// </summary>
165-
public Task FocusAsync() => InvokeVoidAsync("execute", "focus");
165+
public Task FocusAsync() => InvokeVoidAsync("execute", Id, "focus");
166166

167167
/// <summary>
168168
/// <para lang="zh">让编辑器失去焦点</para>
169169
/// <para lang="en">Blurs the editor.</para>
170170
/// </summary>
171-
public Task BlurAsync() => InvokeVoidAsync("execute", "blur");
171+
public Task BlurAsync() => InvokeVoidAsync("execute", Id, "blur");
172172

173173
/// <summary>
174174
/// <para lang="zh">客户端渲染完毕回调方法 由 JavaScript 调用</para>

0 commit comments

Comments
 (0)