From 73e7402c472d364a9ba0799fc7a2a6833485bc97 Mon Sep 17 00:00:00 2001
From: Argo Zhang @((MarkupString)LocalizerForm["ValidateFormNormalFormLabelWidth"].Value) @((MarkupString)LocalizerForm["LongDisplayDescription"].Value)
- @((MarkupString)Localizer["LabelsValidateForm2Description4"].Value)
- :root {
+ --bb-row-label-width: 120px;
+}
+
@((MarkupString)Localizer["LabelsWidthDescription"].Value)
+<ValidateForm Model="@@Dummy4" LabelWidth="100"> + <EditorForm TModel="Foo" ItemsPerRow="2" RowType="RowType.Inline" LabelAlign="Alignment.Right" LabelWidth="120" + AutoGenerateAllItem="false"> + <FieldItems> + <EditorItem @@bind-Field="@@Dummy4.Name"></EditorItem> + </FieldItems> + </EditorForm> + + <BootstrapLabelSetting LabelWidth="220"> + <div class="row form-inline g-3 mt-0"> + <div class="col-12 col-sm-6"> + <BootstrapLabel LabelWidth="180" Value="@@LocalizerForm["LongDisplayText"]"></BootstrapLabel> + <BootstrapInput @@bind-Value="Dummy4.Name" ShowLabel="false" /> + </div> + </div> + </BootstrapLabelSetting> +</ValidateForm>+
+ @((MarkupString)Localizer["LabelsWidthCode1"].Value) 180 +
+ValidateForm 100EditorForm 120BootstrapLabelSetting 220BootstrapLabel 180ShowLabel property of the true. All components display tagsShowLabel=\"false\", all form components in the component Do not display tagsform-inline for the all labels within the component are prefixedform-inline-end set the label alignment is rightform-inline-center set the label alignment is centerform-inline-center set the label alignment is center--bb-row-label-width",
+ "LabelsWidthTitle": "Parameter setting label width",
+ "LabelsWidthIntro": "Control the label width by setting the variable LabelWidth",
+ "LabelsWidthDescription": "The components ValidateForm EditorForm BootstrapLabelSetting ValidateForm can set the label width value. The components use the proximity principle to determine the final value",
+ "LabelsWidthCode1": "As shown in the code above, the final value is 180 according to the principle of proximity"
},
"BootstrapBlazor.Server.Components.Pages.Install": {
"InstallTitle": "Install",
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index 005f2dfc7f7..6603ae440b0 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -1029,9 +1029,14 @@
"LabelsValidateForm2Description1": "显示标签ShowLabel 属性,未设置时等同于设置为 true,所有组件 显示 标签ShowLabel=\"false\",组件内的所有表单组件 不显示 标签form-inline,组件内的所有表单组件标签前置form-inline-end 标签右对齐form-inline-center 标签居中对齐form-inline-center 标签居中对齐--bb-row-label-width 控制标签宽度",
+ "LabelsWidthTitle": "参数设置标签宽度",
+ "LabelsWidthIntro": "通过设置变量 LabelWidth 控制标签宽度",
+ "LabelsWidthDescription": "组件 ValidateForm EditorForm BootstrapLabelSetting ValidateForm 均可以设置标签宽度值,组件采用 就近原则 来确定最终值",
+ "LabelsWidthCode1": "如上代码所示, 根据就近原则最终取值 180"
},
"BootstrapBlazor.Server.Components.Pages.Install": {
"InstallTitle": "安装",