Skip to content

Commit a3858be

Browse files
committed
Merge branch 'master' into feat-net10
# Conflicts: # src/components/BootstrapBlazor.CherryMarkdown/BootstrapBlazor.CherryMarkdown.csproj # src/components/BootstrapBlazor.Markdown/BootstrapBlazor.Markdown.csproj # src/components/BootstrapBlazor.Region/BootstrapBlazor.Region.csproj # src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj # src/components/BootstrapBlazor.Vditor/BootstrapBlazor.Vditor.csproj # test/UnitTestEditor/UnitTestEditor.csproj # test/UnitTestHoliday/UnitTestHoliday.csproj # test/UnitTestOpcDa/UnitTestOpcDa.csproj # test/UnitTestOpcUa/UnitTestOpcUa.csproj # test/UnitTestRegion/UnitTestRegion.csproj # test/UnitTestSvgIcon/UnitTestSvgIcon.csproj # tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj
2 parents 3d8e099 + 4f0b0e4 commit a3858be

35 files changed

Lines changed: 386 additions & 122 deletions

File tree

BootstrapBlazor.Extensions.slnx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@
103103
<File Path="src/readme.md" />
104104
<File Path="src/SourceLink.targets" />
105105
</Folder>
106-
<Folder Name="/src/tools/">
107-
<Project Path="src/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj" />
108-
</Folder>
109106
<Folder Name="/test/">
110107
<Project Path="test/UnitTestEditor/UnitTestEditor.csproj" />
111108
<Project Path="test/UnitTestHoliday/UnitTestHoliday.csproj" />
@@ -114,4 +111,10 @@
114111
<Project Path="test/UnitTestRegion/UnitTestRegion.csproj" Id="37e8696e-3ae5-468f-b6d9-0a8eb4e81876" />
115112
<Project Path="test/UnitTestSvgIcon/UnitTestSvgIcon.csproj" />
116113
</Folder>
114+
<Folder Name="/test/props/">
115+
<File Path="test/Directory.Build.props" />
116+
</Folder>
117+
<Folder Name="/tools/">
118+
<Project Path="tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj" />
119+
</Folder>
117120
</Solution>

exclusion.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ scrlang
102102
Validata
103103
Validatable
104104
Totp
105+
Vditor
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
@namespace BootstrapBlazor.Components
2-
@inherits BootstrapModuleComponentBase
1+
@namespace BootstrapBlazor.Components
2+
@inherits ValidateBase<string>
33
@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.CherryMarkdown/Components/CherryMarkdown/CherryMarkdown.razor.js", JSObjectReference = true)]
44

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

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

Lines changed: 15 additions & 15 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

@@ -31,17 +31,6 @@ public partial class CherryMarkdown
3131
public bool IsSupportMath { get; set; } = true;
3232

3333
private string? _lastValue;
34-
/// <summary>
35-
/// 获得/设置 组件值
36-
/// </summary>
37-
[Parameter]
38-
public string? Value { get; set; }
39-
40-
/// <summary>
41-
/// 获得/设置 组件值回调
42-
/// </summary>
43-
[Parameter]
44-
public EventCallback<string?> ValueChanged { get; set; }
4534

4635
/// <summary>
4736
/// 获得/设置 组件 Html 代码
@@ -73,6 +62,11 @@ public partial class CherryMarkdown
7362
[Parameter]
7463
public string? Language { get; set; }
7564

65+
private string? ClassString => CssBuilder.Default("bb-cherry-markdown")
66+
.AddClass(CssClass)
67+
.AddClass(ValidCss)
68+
.Build();
69+
7670
/// <summary>
7771
/// <inheritdoc/>
7872
/// </summary>
@@ -112,9 +106,15 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
112106
/// <inheritdoc/>
113107
/// </summary>
114108
/// <returns></returns>
115-
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop,
116-
new { Value, IsSupportMath, IsViewer, Locale = Language, Editor = EditorSettings ?? new(), Toolbars = ToolbarSettings ?? new() },
117-
nameof(Upload));
109+
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new
110+
{
111+
Value,
112+
IsSupportMath,
113+
IsViewer,
114+
Locale = Language,
115+
Editor = EditorSettings ?? new(),
116+
Toolbars = ToolbarSettings ?? new()
117+
}, nameof(Upload));
118118

119119
/// <summary>
120120
/// 文件上传回调

src/components/BootstrapBlazor.CherryMarkdown/Components/CherryMarkdown/CherryMarkdown.razor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '../../js/cherry-markdown.core.js'
1+
import '../../js/cherry-markdown.core.js'
22
import { addLink, addScript } from '../../../BootstrapBlazor/modules/utility.js'
33
import Data from '../../../BootstrapBlazor/modules/data.js'
44

@@ -8,7 +8,7 @@ export async function init(id, invoke, options, callback) {
88
return;
99
}
1010

11-
await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/cherry-markdown.min.css')
11+
await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/cherry-markdown.css')
1212
if (options.isSupportMath) {
1313
await addScript('./_content/BootstrapBlazor.CherryMarkdown/js/katex.min.js')
1414
await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/katex.min.css')
@@ -42,7 +42,7 @@ export async function init(id, invoke, options, callback) {
4242

4343
options.editor = {
4444
theme: 'Default',
45-
height: '100%',
45+
height: "200px",
4646
defaultModel: 'edit&preview',
4747
convertWhenPaste: true,
4848
...options.editor
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import url('cherry-markdown.min.css');
2+
3+
.bb-cherry-markdown {
4+
}
5+
6+
.bb-cherry-markdown.is-valid {
7+
border: 1px solid var(--bs-success);
8+
}
9+
10+
.bb-cherry-markdown.is-invalid {
11+
border: 1px solid var(--bs-danger);
12+
}
13+
14+
.bb-cherry-markdown .cherry {
15+
border: 1px solid var(--bs-border-color);
16+
border-radius: var(--bs-border-radius);
17+
overflow: hidden;
18+
}

src/components/BootstrapBlazor.CherryMarkdown/wwwroot/css/cherry-markdown.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

0 commit comments

Comments
 (0)