Skip to content

Commit 8790060

Browse files
authored
feat(Editor): support ShowLabel parameter (#655)
* feat: 支持表单组件 * chore: bump version 9.0.8
1 parent 7f64361 commit 8790060

3 files changed

Lines changed: 8 additions & 22 deletions

File tree

src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.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.7</Version>
4+
<Version>9.0.8</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
@namespace BootstrapBlazor.Components
1+
@namespace BootstrapBlazor.Components
22
@using Microsoft.AspNetCore.Components.Web
3-
@inherits BootstrapModuleComponentBase
3+
@inherits ValidateBase<string>
44
@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js", JSObjectReference = true)]
55

6+
@if (IsShowLabel)
7+
{
8+
<BootstrapLabel required="@Required" for="@Id" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
9+
}
610
<div @attributes="@AdditionalAttributes" id="@Id" class="editor" data-bb-submit="@ShowSubmitString">
711
<div class="@EditClassString" placeholder="@PlaceHolder"></div>
812
</div>

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

Lines changed: 1 addition & 19 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

@@ -76,12 +76,6 @@ public partial class Editor
7676

7777
private string? _lastValue;
7878

79-
/// <summary>
80-
/// 获得/设置 组件值
81-
/// </summary>
82-
[Parameter]
83-
public string? Value { get; set; }
84-
8579
/// <summary>
8680
/// 获得/设置 语言,默认为 null 自动判断,内置中英文额外语言包需要自行引入语言包
8781
/// </summary>
@@ -94,18 +88,6 @@ public partial class Editor
9488
[Parameter]
9589
public string? LanguageUrl { get; set; }
9690

97-
/// <summary>
98-
/// 获得/设置 组件值变化后的回调委托
99-
/// </summary>
100-
[Parameter]
101-
public EventCallback<string?> ValueChanged { get; set; }
102-
103-
/// <summary>
104-
/// 获得/设置 组件值变化后的回调委托
105-
/// </summary>
106-
[Parameter]
107-
public Func<string, Task>? OnValueChanged { get; set; }
108-
10991
/// <summary>
11092
/// 获取/设置 插件点击时的回调委托
11193
/// </summary>

0 commit comments

Comments
 (0)