Skip to content

Commit aef8d4c

Browse files
committed
refactor: 更细逻辑
1 parent 2f1e8eb commit aef8d4c

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,20 +186,10 @@ protected override async Task InvokeInitAsync()
186186
/// </summary>
187187
/// <param name="value"></param>
188188
[JSInvokable]
189-
public async Task Update(string value)
189+
public void Update(string value)
190190
{
191-
Value = value;
192-
_lastValue = Value;
193-
194-
if (ValueChanged.HasDelegate)
195-
{
196-
await ValueChanged.InvokeAsync(Value);
197-
}
198-
199-
if (OnValueChanged != null)
200-
{
201-
await OnValueChanged.Invoke(value);
202-
}
191+
CurrentValue = value;
192+
_lastValue = value;
203193
}
204194

205195
/// <summary>

0 commit comments

Comments
 (0)