Skip to content

Commit 9fdb913

Browse files
committed
Merge branch 'master' into dev-vidtor
2 parents 524678e + ae471b0 commit 9fdb913

6 files changed

Lines changed: 214 additions & 178 deletions

File tree

src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

3+
<PropertyGroup>
4+
<Version>10.0.2</Version>
5+
</PropertyGroup>
6+
37
<PropertyGroup>
48
<PackageTags>Bootstrap Blazor WebAssembly wasm UI Components Sortable</PackageTags>
59
<Description>Bootstrap UI components extensions of SortableJS</Description>
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
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

55
namespace BootstrapBlazor.Components;
66

77
/// <summary>
8-
/// SortableEvent 类
8+
/// <para lang="zh">SortableEvent 类</para>
9+
/// <para lang="en">SortableEvent class</para>
910
/// </summary>
1011
public class SortableEvent
1112
{
1213
/// <summary>
13-
/// 获得/设置 原始项所属容器 Id
14+
/// <para lang="zh">获得/设置 原始项所属容器 Id</para>
15+
/// <para lang="en">Gets or sets the container Id of the original item.</para>
1416
/// </summary>
1517
[NotNull]
1618
public string? FromId { get; set; }
1719

1820
/// <summary>
19-
/// 获得/设置 原始索引
21+
/// <para lang="zh">获得/设置 原始索引</para>
22+
/// <para lang="en">Gets or sets the original index.</para>
2023
/// </summary>
2124
[NotNull]
2225
public int OldIndex { get; set; }
2326

2427
/// <summary>
25-
/// 获得/设置 新索引
28+
/// <para lang="zh">获得/设置 新索引</para>
29+
/// <para lang="en">Gets or sets the new index.</para>
2630
/// </summary>
2731
[NotNull]
2832
public int NewIndex { get; set; }
2933

3034
/// <summary>
31-
/// 获得/设置 移动元素 <see cref="SortableListItem"/> 集合
35+
/// <para lang="zh">获得 移动元素 <see cref="SortableListItem"/> 集合</para>
36+
/// <para lang="en">Gets the collection of moved <see cref="SortableListItem"/> elements.</para>
3237
/// </summary>
3338
public List<SortableListItem> Items { get; } = [];
3439
}

src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.cs

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

@@ -8,55 +8,59 @@
88
namespace BootstrapBlazor.Components;
99

1010
/// <summary>
11-
/// SortableList 组件
11+
/// <para lang="zh">SortableList 组件</para>
12+
/// <para lang="en">SortableList component</para>
1213
/// </summary>
1314
public partial class SortableList : ISortableList
1415
{
1516
/// <summary>
16-
/// 获得/设置 配置项实例 <see cref="SortableOption"/>
17+
/// <para lang="zh">获得/设置 配置项实例 <see cref="SortableOption"/></para>
18+
/// <para lang="en">Gets or sets the configuration option instance <see cref="SortableOption"/>.</para>
1719
/// </summary>
1820
[Parameter]
1921
public SortableOption? Option { get; set; }
2022

2123
/// <summary>
22-
/// 获得/设置 子组件 必填项不可为空
24+
/// <para lang="zh">获得/设置 子组件 必填项不可为空</para>
25+
/// <para lang="en">Gets or sets the child content. Required and cannot be null.</para>
2326
/// </summary>
2427
[Parameter]
2528
[EditorRequired]
2629
public RenderFragment? ChildContent { get; set; }
2730

2831
/// <summary>
29-
/// 获得/设置 元素更新回调方法
32+
/// <para lang="zh">获得/设置 元素更新回调方法</para>
33+
/// <para lang="en">Gets or sets the callback method when an element is updated.</para>
3034
/// </summary>
3135
[Parameter]
3236
public Func<SortableEvent, Task>? OnUpdate { get; set; }
3337

3438
/// <summary>
35-
/// 获得/设置 元素更新回调方法
39+
/// <para lang="zh">获得/设置 元素移除回调方法</para>
40+
/// <para lang="en">Gets or sets the callback method when an element is removed.</para>
3641
/// </summary>
3742
[Parameter]
3843
public Func<SortableEvent, Task>? OnRemove { get; set; }
3944

4045
/// <summary>
41-
/// 获得/设置 元素增加回调方法
46+
/// <para lang="zh">获得/设置 元素增加回调方法</para>
47+
/// <para lang="en">Gets or sets the callback method when an element is added.</para>
4248
/// </summary>
4349
[Parameter]
4450
public Func<SortableEvent, Task>? OnAdd { get; set; }
45-
4651
private string? ClassString => CssBuilder.Default("bb-sortable")
4752
.AddClassFromAttributes(AdditionalAttributes)
4853
.Build();
4954

5055
/// <summary>
5156
/// <inheritdoc />
5257
/// </summary>
53-
/// <returns></returns>
5458
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, Option, OnUpdate != null, OnRemove != null, OnAdd != null);
5559

5660
/// <summary>
57-
/// JavaScript 调用触发节点更新方法
61+
/// <para lang="zh">由 JavaScript 调用触发节点更新方法</para>
62+
/// <para lang="en">Called by JavaScript to trigger the node update method.</para>
5863
/// </summary>
59-
/// <returns></returns>
6064
[JSInvokable]
6165
public async Task TriggerUpdate(List<SortableListItem> items)
6266
{
@@ -75,9 +79,9 @@ public async Task TriggerUpdate(List<SortableListItem> items)
7579
}
7680

7781
/// <summary>
78-
/// JavaScript 调用触发节点更新方法
82+
/// <para lang="zh">由 JavaScript 调用触发节点移除方法</para>
83+
/// <para lang="en">Called by JavaScript to trigger the node remove method.</para>
7984
/// </summary>
80-
/// <returns></returns>
8185
[JSInvokable]
8286
public async Task TriggerRemove(List<SortableListItem> items)
8387
{
@@ -96,9 +100,9 @@ public async Task TriggerRemove(List<SortableListItem> items)
96100
}
97101

98102
/// <summary>
99-
/// JavaScript 调用触发节点更新方法
103+
/// <para lang="zh">由 JavaScript 调用触发节点增加方法</para>
104+
/// <para lang="en">Called by JavaScript to trigger the node add method.</para>
100105
/// </summary>
101-
/// <returns></returns>
102106
[JSInvokable]
103107
public async Task TriggerAdd(List<SortableListItem> items)
104108
{
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
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

55
namespace BootstrapBlazor.Components;
66

77
/// <summary>
8-
/// SortableListItem 类
8+
/// <para lang="zh">SortableListItem 类</para>
9+
/// <para lang="en">SortableListItem class</para>
910
/// </summary>
1011
public class SortableListItem
1112
{
1213
/// <summary>
13-
/// 获得/设置 原始项所属容器 Id
14+
/// <para lang="zh">获得/设置 原始项所属容器 Id</para>
15+
/// <para lang="en">Gets or sets the container Id of the original item.</para>
1416
/// </summary>
1517
[NotNull]
1618
public string? FromId { get; set; }
1719

1820
/// <summary>
19-
/// 获得/设置 原始索引
21+
/// <para lang="zh">获得/设置 原始索引</para>
22+
/// <para lang="en">Gets or sets the original index.</para>
2023
/// </summary>
2124
public int OldIndex { get; set; }
2225

2326
/// <summary>
24-
/// 获得/设置 新索引
27+
/// <para lang="zh">获得/设置 新索引</para>
28+
/// <para lang="en">Gets or sets the new index.</para>
2529
/// </summary>
2630
public int NewIndex { get; set; }
2731
}

0 commit comments

Comments
 (0)