-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Dropdown): add IsAsync parameter (#5324)
* refactor: update html element tag name * test: 更新单元测试 * doc: 更新参数注释 * feat(Dropdown): add IsAsync parameter * refactor: 精简代码 提高代码可读性 * refactor: 代码重构 * feat: 实现 IsAsync 逻辑 * doc: 增加 IsAsync 文档 * feat: 分离按钮支持默认颜色 * feat: 异步图标显示逻辑 * refactor: 增加 span 包裹元素 * doc: 增加文档 * feat: 增加图标赋值逻辑 * refactor: 使用父类服务 * test: 增加单元测试 * chore: bump version 9.3.1-beta10 Co-Authored-By: ice6 <[email protected]>
- Loading branch information
Showing
11 changed files
with
175 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
// See the LICENSE file in the project root for more information. | ||
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone | ||
|
||
using Microsoft.AspNetCore.Components.Web; | ||
|
||
namespace BootstrapBlazor.Components; | ||
|
||
/// <summary> | ||
|
@@ -33,21 +31,18 @@ public class CountButton : Button | |
/// <summary> | ||
/// <inheritdoc/> | ||
/// </summary> | ||
protected override void SetClickHandler() | ||
protected override async Task OnClickButton() | ||
{ | ||
OnClickButton = EventCallback.Factory.Create<MouseEventArgs>(this, async () => | ||
{ | ||
IsAsyncLoading = true; | ||
ButtonIcon = LoadingIcon; | ||
IsDisabled = true; | ||
IsAsyncLoading = true; | ||
ButtonIcon = LoadingIcon; | ||
IsDisabled = true; | ||
|
||
await Task.Run(() => InvokeAsync(HandlerClick)); | ||
await UpdateCount(); | ||
await Task.Run(() => InvokeAsync(HandlerClick)); | ||
await UpdateCount(); | ||
|
||
IsDisabled = false; | ||
ButtonIcon = Icon; | ||
IsAsyncLoading = false; | ||
}); | ||
IsDisabled = false; | ||
ButtonIcon = Icon; | ||
IsAsyncLoading = false; | ||
} | ||
|
||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.