Skip to content

Commit b8617d6

Browse files
committed
doc: 更新文档
1 parent bd97e07 commit b8617d6

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ private AttributeItem[] GetAttributes() =>
202202
DefaultValue = "false"
203203
},
204204
new()
205+
{
206+
Name = nameof(Tab.IsLoopSwitchTabItem),
207+
Description = Localizer["TabAttIsLoopSwitchTabItem"].Value,
208+
Type = "boolean",
209+
ValueList = "true/false",
210+
DefaultValue = "true"
211+
},
212+
new()
205213
{
206214
Name = "ShowClose",
207215
Description = Localizer["TabAtt4ShowClose"].Value,

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@
20632063
"Block9Div": "Header",
20642064
"TabsAppTitle": "Live Tab components",
20652065
"TabsAppIntro": "By setting the <code>ShowExtendButtons</code> property to <code>true</code>, turning on the left and right buttons of the component and closing the drop-down menu, it is very useful in practice",
2066-
"TabsAppDescription": "Dynamically adjust the number of <code>TabItem</code> by <b>adding</b>, <b>delete</b>buttons to view the left and right effects beyond the number of containers, <b>user management</b> is set to not close, and the feature button cannot close this tab",
2066+
"TabsAppDescription": "Dynamically adjust the number of <code>TabItem</code> by <b>adding</b>, <b>delete</b>buttons to view the left and right effects beyond the number of containers, <b>user management</b> is set to not close, and the feature button cannot close this tab. The component switches tabs in a loop by default. You can disable this feature by <code>IsLoopSwitchTabItem=\"false\"</code>",
20672067
"TabsIsOnlyRenderActiveTitle": "Only the current label is rendered",
20682068
"TabsIsOnlyRenderActiveIntro": "By setting the <code>isOnlyRenderActiveTab</code> parameter, the component renders only the current active label",
20692069
"BlockSetTextTitle": "TabItem Text",
@@ -2090,6 +2090,7 @@
20902090
"TabAttShowNavigatorButtons": "Whether to display the previous and next navigation buttons",
20912091
"TabAttShowActiveBar": "Whether to display active bar",
20922092
"TabAttIsLazyLoadTabItem": "Whether lazy load tab item",
2093+
"TabAttIsLoopSwitchTabItem": "Whether loop switch tab item",
20932094
"TabAtt6ClickTabToNavigation": "Whether to navigate when you click on the title",
20942095
"TabAtt7Placement": "Set the label position",
20952096
"TabAtt8Height": "Set the label height",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@
20632063
"Block9Div": "网站 Header",
20642064
"TabsAppTitle": "实战 Tab 组件",
20652065
"TabsAppIntro": "通过设置 <code>ShowExtendButtons</code> 属性为 <code>true</code>,开启组件左右移动按钮与关闭下拉菜单,实战中非常实用",
2066-
"TabsAppDescription": "通过 <b>添加</b> <b>删除</b> 按钮动态调整 <code>TabItem</code> 数量,使其超出容器数量查看,左右移动效果;<b>用户管理</b> 设置为不可关闭;功能按钮无法关闭这个标签页",
2066+
"TabsAppDescription": "通过 <b>添加</b> <b>删除</b> 按钮动态调整 <code>TabItem</code> 数量,使其超出容器数量查看,左右移动效果;<b>用户管理</b> 设置为不可关闭;功能按钮无法关闭这个标签页。组件默认是循环切换标签页的,可以通过 <code>IsLoopSwitchTabItem=\"false\"</code> 关闭这个功能",
20672067
"TabsIsOnlyRenderActiveTitle": "仅渲染当前标签",
20682068
"TabsIsOnlyRenderActiveIntro": "通过设置 <code>IsOnlyRenderActiveTab</code> 参数使组件仅渲染当前活动标签",
20692069
"BlockSetTextTitle": "设置标签文本",
@@ -2090,6 +2090,7 @@
20902090
"TabAttShowNavigatorButtons": "是否显示前后导航按钮",
20912091
"TabAttShowActiveBar": "是否显示活动标签",
20922092
"TabAttIsLazyLoadTabItem": "是否延时加载标签内容",
2093+
"TabAttIsLoopSwitchTabItem": "是否循环切换标签",
20932094
"TabAtt6ClickTabToNavigation": "点击标题时是否导航",
20942095
"TabAtt7Placement": "设置标签位置",
20952096
"TabAtt8Height": "设置标签高度",

src/BootstrapBlazor/Components/Tab/Tab.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public partial class Tab : IHandlerException
143143
/// Gets or sets whether auto reset tab item index. Default is true.
144144
/// </summary>
145145
[Parameter]
146-
public bool IsAutoLoopTabItem { get; set; } = true;
146+
public bool IsLoopSwitchTabItem { get; set; } = true;
147147

148148
/// <summary>
149149
/// 获得/设置 是否显示活动标签 默认为 true 显示
@@ -656,7 +656,7 @@ public void ClickPrevTab()
656656
index--;
657657
if (index < 0)
658658
{
659-
if (IsAutoLoopTabItem)
659+
if (IsLoopSwitchTabItem)
660660
{
661661
index = TabItems.Count - 1;
662662
}
@@ -699,7 +699,7 @@ public void ClickNextTab()
699699
index++;
700700
if (index + 1 > TabItems.Count)
701701
{
702-
if (IsAutoLoopTabItem)
702+
if (IsLoopSwitchTabItem)
703703
{
704704
index = 0;
705705
}

0 commit comments

Comments
 (0)