-
-
Notifications
You must be signed in to change notification settings - Fork 382
doc(Comment): update commnet of components #7596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,48 +6,52 @@ | |||||||||||||||||||||
| namespace BootstrapBlazor.Components; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">拖拽服务</para> | ||||||||||||||||||||||
| /// <para lang="en">Drag Drop Service</para> | ||||||||||||||||||||||
| /// <para lang="zh">DragDropService 拖拽服务</para> | ||||||||||||||||||||||
| /// <para lang="en">DragDropService component</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
|
Comment on lines
8
to
11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (typo): Consider changing the English summary to call this a "service" rather than a "component" for consistency with the class role. Since this is an internal service (
Suggested change
|
||||||||||||||||||||||
| /// <typeparam name="T"></typeparam> | ||||||||||||||||||||||
| internal class DragDropService<T> | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">活动的Item</para> | ||||||||||||||||||||||
| /// <para lang="en">Active Item</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 活动的Item</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Active Item</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public T? ActiveItem { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">悬停的项目</para> | ||||||||||||||||||||||
| /// <para lang="en">Drag Target Item</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 悬停的项目</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Drag Target Item</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public T? DragTargetItem { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">被拖拽的Items</para> | ||||||||||||||||||||||
| /// <para lang="en">Dragged Items</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 被拖拽的 Items</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Dragged Items</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public List<T>? Items { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">活动的Id</para> | ||||||||||||||||||||||
| /// <para lang="en">Active Id</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 活动的 Id</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Active Id</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public int? ActiveSpacerId { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">之前的位置</para> | ||||||||||||||||||||||
| /// <para lang="en">Previous Index</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 之前的位置</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Previous Index</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public int? OldIndex { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">通知刷新</para> | ||||||||||||||||||||||
| /// <para lang="en">Notify StateChanged</para> | ||||||||||||||||||||||
| /// <para lang="zh">获得/设置 通知刷新方法</para> | ||||||||||||||||||||||
| /// <para lang="en">Gets or sets Notify StateChanged</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public EventHandler? StateHasChanged { get; set; } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">重置方法</para> | ||||||||||||||||||||||
| /// <para lang="en">Reset method</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public void Reset() | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| if (OldIndex is >= 0 && Items != null && ActiveItem != null) | ||||||||||||||||||||||
|
|
@@ -57,6 +61,10 @@ public void Reset() | |||||||||||||||||||||
| Commit(); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /// <summary> | ||||||||||||||||||||||
| /// <para lang="zh">提交方法</para> | ||||||||||||||||||||||
| /// <para lang="en">Commit method</para> | ||||||||||||||||||||||
| /// </summary> | ||||||||||||||||||||||
| public void Commit() | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| ActiveItem = default; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,15 +6,11 @@ | |||||
| namespace BootstrapBlazor.Components; | ||||||
|
|
||||||
| /// <summary> | ||||||
| /// <para lang="zh">Drawer component</para> | ||||||
| /// <para lang="zh">Drawer 抽屉组件</para> | ||||||
|
||||||
| /// <para lang="zh">Drawer 抽屉组件</para> | |
| /// <para lang="zh">Drawer 组件</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The English translation appears to be a placeholder. It says "DragDropService component" but should say something like "Drag and Drop Service" or "Drag Drop Service" to properly describe the functionality in English, similar to the original comment.