Skip to content

Commit 8fcad75

Browse files
authored
feat(Markdown): support ShowLabel parameter (#657)
* feat(Markdown): support ShowLabel parameter * chore: bump version 9.0.3
1 parent 8790060 commit 8fcad75

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

src/components/BootstrapBlazor.Markdown/BootstrapBlazor.Markdown.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.0.2</Version>
4+
<Version>9.0.3</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
@namespace BootstrapBlazor.Components
1+
@namespace BootstrapBlazor.Components
22
@inherits ValidateBase<string>
33

4+
@if (IsShowLabel)
5+
{
6+
<BootstrapLabel required="@Required" for="@Id" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
7+
}
48
<div @attributes="@AdditionalAttributes" id="@Id" class="@GetClassString()" />

src/components/BootstrapBlazor.Markdown/Components/Markdown/Markdown.razor.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

@@ -117,19 +117,19 @@ protected override void OnInitialized()
117117
/// <summary>
118118
/// 更新组件值方法
119119
/// </summary>
120-
/// <param name="vals"></param>
120+
/// <param name="values"></param>
121121
/// <returns></returns>
122122
[JSInvokable]
123-
public async Task Update(string[] vals)
123+
public async Task Update(string[] values)
124124
{
125-
if (vals.Length == 2)
125+
if (values.Length == 2)
126126
{
127-
CurrentValueAsString = vals[0];
127+
CurrentValueAsString = values[0];
128128

129-
var hasChanged = !EqualityComparer<string>.Default.Equals(vals[1], Html);
129+
var hasChanged = !EqualityComparer<string>.Default.Equals(values[1], Html);
130130
if (hasChanged)
131131
{
132-
Html = vals[1];
132+
Html = values[1];
133133
if (HtmlChanged.HasDelegate)
134134
{
135135
await HtmlChanged.InvokeAsync(Html);

0 commit comments

Comments
 (0)