Skip to content

Commit bf8077e

Browse files
committed
feat(Vditor): support ShowLabel parameter
1 parent 8790060 commit bf8077e

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

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)