Skip to content

Commit da15e6d

Browse files
committed
refactor: 使用原生元素
1 parent 81c7c47 commit da15e6d

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</button>
3939
}
4040
<div class="d-flex align-items-center justify-content-center flex-fill">
41-
<DynamicElement TagName="span" role="button" class="picker-panel-header-label" OnClick="() => SwitchView(DatePickerViewMode.Year)">@YearString</DynamicElement>
42-
<DynamicElement TagName="span" role="button" class="@CurrentMonthViewClassName" OnClick="() => SwitchView(DatePickerViewMode.Month)">@MonthString</DynamicElement>
41+
<span role="button" class="picker-panel-header-label" @onclick="() => SwitchView(DatePickerViewMode.Year)">@YearString</span>
42+
<span role="button" class="@CurrentMonthViewClassName" @onclick="() => SwitchView(DatePickerViewMode.Month)">@MonthString</span>
4343
@if (IsDateTimeMode)
4444
{
4545
<span role="button" class="picker-panel-header-label" @onclick="SwitchTimeView">@CurrentTime.ToString(TimeFormat)</span>

src/BootstrapBlazor/Components/Select/MultiSelect.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
<div class="toolbar">
6868
@if (ShowDefaultButtons)
6969
{
70-
<DynamicElement TagName="button" type="button" class="btn" OnClick="SelectAll">@SelectAllText</DynamicElement>
71-
<DynamicElement TagName="button" type="button" class="btn" OnClick="InvertSelect">@ReverseSelectText</DynamicElement>
72-
<DynamicElement TagName="button" type="button" class="btn" OnClick="Clear">@ClearText</DynamicElement>
70+
<button type="button" class="btn" @onclick="SelectAll">@SelectAllText</button>
71+
<button type="button" class="btn" @onclick="InvertSelect">@ReverseSelectText</button>
72+
<button type="button" class="btn" @onclick="Clear">@ClearText</button>
7373
}
7474
@ButtonTemplate
7575
</div>

src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
<div class="toolbar">
6161
@if (ShowDefaultButtons)
6262
{
63-
<DynamicElement TagName="button" type="button" class="btn" OnClick="SelectAll">@SelectAllText</DynamicElement>
64-
<DynamicElement TagName="button" type="button" class="btn" OnClick="InvertSelect">@ReverseSelectText</DynamicElement>
65-
<DynamicElement TagName="button" type="button" class="btn" OnClick="Clear">@ClearText</DynamicElement>
63+
<button type="button" class="btn" @onclick="SelectAll">@SelectAllText</button>
64+
<button type="button" class="btn" @onclick="InvertSelect">@ReverseSelectText</button>
65+
<button type="button" class="btn" @onclick="Clear">@ClearText</button>
6666
}
6767
@ButtonTemplate
6868
</div>

src/BootstrapBlazor/Components/Upload/CardUpload.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
</div>
5454
@if (ShowDeleteButton)
5555
{
56-
<DynamicElement TagName="button" type="button" class="btn btn-sm btn-outline-danger"
57-
disabled="@GetDeleteButtonDisabledString(item)" aria-label="delete"
58-
TriggerClick="@(!IsDisabled)" OnClick="@(() => OnCardFileDelete(item))">
56+
<button type="button" class="btn btn-sm btn-outline-danger"
57+
disabled="@GetDeleteButtonDisabledString(item)" aria-label="delete"
58+
@onclick="() => OnCardFileDelete(item)">
5959
<i class="@RemoveIcon"></i>
60-
</DynamicElement>
60+
</button>
6161
}
6262
</div>
6363
@if (GetShowProgress(item))

0 commit comments

Comments
 (0)