Skip to content
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

补充 组件API中文注释 #2007

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<MListItem
Value="subItem.Title">
<MListItemContent>
<MListItemTitle>@item.Title</MListItemTitle>
<MListItemTitle>@subItem.Title</MListItemTitle>
</MListItemContent>
</MListItem>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"activeClass": "`ActiveClass` 在子组件被激活时应用。",
"borderless": "移除按钮组的边框。",
"group": "通常用于 [MToolbar](/blazor/components/toolbar) 和 [MAppbar](/blazor/components/appbar)。删除背景颜色、边框并增加按钮的间距",
"mandatory": "强制始终选择一个值(如果可用)。",
"multiple": "允许多个选择。",
"targetGroup": "targetGroup",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值,配合`Multiple`属性使用。"
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"contents": {},
"events": {
"valuesChanged": "值改变事件,使用属性`Multiple`后可用"
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"methods": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@
"props": {
"centerActive": "强制选择的纸片居中",
"column": "删除水平分页并根据需要包装项目",
"max": "设置可以选择的最大数量。",
"multiple": "允许多个选择。",
"nextIcon": "指定用于下一个图标的图标",
"prevIcon": "指定用于上一个图标的图标",
"showArrows": "强制显示分页箭头",
"targetGroup": "",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值。"
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"events": {
"valuesChanged": ""
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"contents": {
"nextContent": "",
"prevContent": ""
}
"contents": {}
}
3 changes: 2 additions & 1 deletion docs/Masa.Blazor.Docs/wwwroot/data/apis/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@
"closeDelay": "关闭组件前等待的毫秒数.",
"openDelay": "打开组件前等待的毫秒数.",
"zIndex": "用于组件的 z-index",
"transition": "设置组件转换。可以是一个 [built in transitions](/blazor/styles-and-animations/transitions) 或者是自己自定义的。"
"transition": "设置组件转换。可以是一个 [built in transitions](/blazor/styles-and-animations/transitions) 或者是自己自定义的。",
"max": "**Group** 类组件可选子项最大数量。设置0时可使子项均不被选中。"
},
"contents": {
"childContent": "默认插槽",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"props": {
"class": "设置 `Content` 上的CSS类。",
"style": "将内联样式应用于 `Content` 。",
"label": "设置标签内容",
"labelClass": "设置 `Label` 上的CSS类。",
"labelStyle": "将内联样式应用于 `Label` 。",
"span": "跨越列数"
},
"contents": {
"childContent": "默认插槽"
},
"events": {},
"methods": {}
}
4 changes: 3 additions & 1 deletion docs/Masa.Blazor.Docs/wwwroot/data/apis/dividers/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"props": {
"center": "Center。",
"left":" `Content` 居左",
"center": " `Content` 居中。当有 `Content` 时默认居中",
"right":" `Content` 居右",
"inset": "添加缩进 (72px)",
"vertical": "垂直显示分隔线",
"length": "自定义线条长度"
Expand Down
16 changes: 8 additions & 8 deletions docs/Masa.Blazor.Docs/wwwroot/data/apis/error-handler/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"props": {
"maximumErrorCount": "最大错误次数",
"onErrorHandleAsync": "自定义错误消息处理",
"showAlert": "是否显示告警",
"showDetail": "是否显示异常信息"
"showDetail": "确定是否显示异常的堆栈跟踪。",
"popupType": "错误提示类型,详见 [示例](https://docs.masastack.com/blazor/components/error-handler/#section-95198bef63d0793a7c7b578b)",
"disablePopupIfErrorContentRender": "在错误内容即将呈现时禁用默认弹出窗口或自定义 `OnHandle` 事件。当您不想同时显示错误内容和弹出窗口时,此功能很有用。"
},
"events": {},
"contents": {
"errorContent": "自定义错误异常插槽"
}
"events": {
"OnHandle": "引发异常时将调用的事件。建议弹出一个对话框来显示异常。如果设置此项,则默认弹出窗口将被禁用。",
"OnAfterHandle": "将在 `OnHandle` 之后调用的事件"
},
"contents": {}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"props": {
"max": "设置可以选择的最大数量。",
"multiple": "允许多个选择。",
"targetGroup": "",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值。"
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"events": {
"valuesChanged": ""
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"contents": {}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"props": {
"max": "设置可以选择的最大数量。",
"multiple": "允许多个选择。",
"targetGroup": "",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值。"
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"events": {
"valuesChanged": ""
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"contents": {}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
{
"props": {
"centerActive": "强制将选中的组件居中",
"max": "设置可以选择的最大数量。",
"multiple": "允许多个选择。",
"nextIcon": "当箭头显示时附加的插槽",
"prevIcon": "当箭头显示时,预定的插槽",
"showArrows": "总是显示分页箭头",
"targetGroup": "",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值。"
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"events": {
"valuesChanged": ""
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"contents": {
"nextContent": "下一个插槽",
"prevContent": "前一个插槽"
}
"contents": {}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"props": {
"continuous": "如果为 true,则窗口将从最后一项到第一项,以及从第一项到最后 \"wrap around\"",
"max": "",
"nextIcon": "如果 `ShowArrows` 为 true,则显示 \"next\" 按钮的图标",
"prevIcon": "如果 `ShowArrows` 为 true,则显示 \"prev\" 按钮的图标",
"reverse": "反转正常的过渡方向。",
"showArrows": "显示 \"next\" 和 \"prev\" 按钮",
"showArrowsOnHover": "悬停时显示 \"next\" 和 \"prev\" 按钮。必须设置 `ShowArrows` 。",
"targetGroup": "",
"value": "组件的指定 model 值。",
"values": "组件的指定 model 值。",
"vertical": "改变窗口时使用垂直转换."
"vertical": "改变窗口时使用垂直转换.",
"value": "单选时,选择项的 `Value`",
"values": "多选时,选择项的 `Value` 组成的列表"
},
"events": {
"valuesChanged": ""
"valueChanged": "选择项改变事件",
"valuesChanged": "开启 `Multiple` 多选时,选择项列表改变事件。"
},
"contents": {
}
Expand Down
1 change: 1 addition & 0 deletions src/Masa.Blazor/Components/ItemGroup/MItemGroupBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ protected MItemGroupBase(GroupType groupType)
public RenderFragment? ChildContent { get; set; }

[Parameter]
[MasaApiParameter(Ignored = true)]
public GroupType? TargetGroup { get; set; }

[Parameter]
Expand Down
Loading