diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json
index de9ced53f50f0d1efba3e42597a9dfeeb7ab0f74..57c3e3a641bd973c34fd26d72bd429c40a0808a2 100644
--- a/src/BootstrapBlazor.Shared/Locales/en.json
+++ b/src/BootstrapBlazor.Shared/Locales/en.json
@@ -1139,7 +1139,8 @@
"Att12": "Whether to read only",
"Att13": "Edit the column's front label name",
"Att14": "Column editing template",
- "IsDisplay": "Shown as Display component"
+ "IsDisplay": "Shown as Display component",
+ "ShowLabelTooltip": "Show complete information when mouse hover over the label"
},
"BootstrapBlazor.Shared.Samples.FloatingLabels": {
"Title": "FloatingLabel",
@@ -1222,6 +1223,7 @@
"Block11Intro": "Use the BootstrapPassword component",
"IsTrimTitle": "Trim",
"IsTrimIntro": "Use IsTrim=\"true\" to automatically trim white space when entering content",
+ "TrimDescription": "The front and back spaces in the component will be trimmed when set IsTrim to true",
"PlaceHolder": "Please enter ...",
"TestName": "Tom",
"Log": "The key triggers the current text box value",
@@ -1780,7 +1782,7 @@
"BasicUsageLi7": "Set the asynchronous submission form by setting the value of the Button Button property IsAsync",
"BasicUsageLi8": "Components within a form are typically used to bind the property values of Model in both directions using bidirectional binding techniques, causing the component to refresh and re-render when its value changes StateHasChanged, and the method is called, i.e. its component or page is refreshed and re-rendered",
"BasicUsageLi9": "After the value of the component control in the form is modified, the OnFieldChanged method is called",
- "FormLabelWidth": "The default width of component front label is 120px. If you need more, please change the style variable --bs-row-label-width in the project style file",
+ "FormLabelWidth": "The default width of component front label is 120px. If you need more, please change the style variable --bs-row-label-width in the project style file or remove RowType.Inline",
"BasicUsageP2": "Note:",
"InnerComponentTitle": "Built-in components",
"InnerComponentIntro": "Place the support form components into the ValidateForm",
@@ -1826,7 +1828,10 @@
"OnValidSubmitDoneLog": "OnValidSubmit callback delegate: Done!",
"OnInvalidSubmitCallBackLog": "OnInvalidSubmit callback delegate",
"OnValidSubmitCallBackLog": "OnValidSubmit callback delegate",
- "DatabaseExistLog": "Exists in the database"
+ "DatabaseExistLog": "Exists in the database",
+ "LongDisplayText": "I am very long display text",
+ "LongDisplayDescription": "In this example, set the ShowLabelTooltip in the form-inline style to true to make the mouse hover over the cropped label to display the complete information",
+ "ShowLabelTooltip": "Show complete information when mouse hover over the label"
},
"BootstrapBlazor.Shared.Samples.Avatars": {
"Title": "Avatar",
diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json
index 720df626c95175a4eab3042cb3be08a597d9c9aa..1b0e868535738e7ef6539a3c85ce36df89fe79c7 100644
--- a/src/BootstrapBlazor.Shared/Locales/zh.json
+++ b/src/BootstrapBlazor.Shared/Locales/zh.json
@@ -1141,7 +1141,8 @@
"Att12": "是否只读",
"Att13": "编辑列前置标签名",
"Att14": "列编辑模板",
- "IsDisplay": "是否显示为 Display 组件"
+ "IsDisplay": "是否显示为 Display 组件",
+ "ShowLabelTooltip": "鼠标悬停标签时显示完整信息"
},
"BootstrapBlazor.Shared.Samples.FloatingLabels": {
"Title": "FloatingLabel 输入框",
@@ -1224,6 +1225,7 @@
"Block11Intro": "使用 BootstrapPassword 组件",
"IsTrimTitle": "修剪空白",
"IsTrimIntro": "使用 IsTrim=\"true\" 可在输入内容的时候自动修剪空白",
+ "TrimDescription": "设置参数 IsTrim 值为 true 后,组件内的前后空格将会被裁减",
"PlaceHolder": "请输入 ...",
"TestName": "张三",
"Log": "按键触发 当前文本框值",
@@ -1783,7 +1785,7 @@
"BasicUsageLi7": "通过设置提交按钮 Button 属性 IsAsync 值,设置异步提交表单",
"BasicUsageLi8": "表单内组件通常用法都是使用双向绑定技术对 Model 的属性值进行双向绑定,当其值改变时会导致所在组件 StateHasChanged 方法被调用,即其所在组件或者页面进行刷新重新渲染",
"BasicUsageLi9": "表单内组件控件的值修改后 OnFieldChanged 方法被调用",
- "FormLabelWidth": "组件前置标签默认宽度为 120px 六个汉字,如需要更多汉字请在项目样式文件中更改样式变量 --bs-row-label-width 即可",
+ "FormLabelWidth": "组件前置标签默认宽度为 120px 六个汉字,如需要更多汉字请在项目样式文件中更改样式变量 --bs-row-label-width 即可,或者设置表单显示标签在组件上方",
"BasicUsageP2": "注意事项:",
"InnerComponentTitle": "内置组件",
"InnerComponentIntro": "放置支持表单组件到 ValidateForm 中",
@@ -1829,7 +1831,10 @@
"OnValidSubmitDoneLog": "OnValidSubmit 回调委托: Done!",
"OnInvalidSubmitCallBackLog": "OnInvalidSubmit 回调委托",
"OnValidSubmitCallBackLog": "OnValidSubmit 回调委托",
- "DatabaseExistLog": "数据库中已存在"
+ "DatabaseExistLog": "数据库中已存在",
+ "LongDisplayText": "我是特别长的显示标签",
+ "LongDisplayDescription": "本例中通过设置 form-inline 样式内的 BootstrapInput 组件 ShowLabelTooltip 为 true 使鼠标悬停在被裁剪的 label 时显示完整信息",
+ "ShowLabelTooltip": "鼠标悬停标签时显示完整信息"
},
"BootstrapBlazor.Shared.Samples.Avatars": {
"Title": "Avatar 头像",
diff --git a/src/BootstrapBlazor.Shared/Samples/Displays.razor b/src/BootstrapBlazor.Shared/Samples/Displays.razor
index 971b8c65a2b7653dfc833a4fbe06193bf4723b10..2fcdd4e51c073ee75a3c68ea5d7d666f952e05ca 100644
--- a/src/BootstrapBlazor.Shared/Samples/Displays.razor
+++ b/src/BootstrapBlazor.Shared/Samples/Displays.razor
@@ -91,7 +91,7 @@
-
@Localizer["FormatStringP"]
+
@((MarkupString)Localizer["FormatStringP"].Value)
@Localizer["FormatStringettingText"] Formatter
diff --git a/src/BootstrapBlazor.Shared/Samples/EditorForms.razor.cs b/src/BootstrapBlazor.Shared/Samples/EditorForms.razor.cs
index 1c0c305b81f0b2aed7c40cc22bb91aa05ccd4b29..9ed2c008f433105757633c29bdc05ef4dd635628 100644
--- a/src/BootstrapBlazor.Shared/Samples/EditorForms.razor.cs
+++ b/src/BootstrapBlazor.Shared/Samples/EditorForms.razor.cs
@@ -67,116 +67,123 @@ public sealed partial class EditorForms
private IEnumerable GetAttributes() => new AttributeItem[]
{
- // TODO: 移动到数据库中
- new AttributeItem() {
- Name = "Model",
- Description = Localizer["Att1"],
- Type = "TModel",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "FieldItems",
- Description = Localizer["Att2"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "Buttons",
- Description = Localizer["Att3"],
- Type = "RenderFragment",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = nameof(EditorForm.IsDisplay),
- Description = Localizer["IsDisplay"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new AttributeItem() {
- Name = "ShowLabel",
- Description = Localizer["Att4"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new AttributeItem() {
- Name = "AutoGenerateAllItem",
- Description = Localizer["Att5"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new AttributeItem() {
- Name = "ItemsPerRow",
- Description = Localizer["Att6"],
- Type = "int?",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "RowType",
- Description = Localizer["Att7"],
- Type = "RowType",
- ValueList = "Row|Inline",
- DefaultValue = "Row"
- },
- new AttributeItem() {
- Name = "LabelAlign",
- Description = Localizer["Att8"],
- Type = "Alignment",
- ValueList = "None|Left|Center|Right",
- DefaultValue = "None"
- }
+ // TODO: 移动到数据库中
+ new AttributeItem() {
+ Name = "Model",
+ Description = Localizer["Att1"],
+ Type = "TModel",
+ ValueList = " — ",
+ DefaultValue = " — "
+ },
+ new AttributeItem() {
+ Name = "FieldItems",
+ Description = Localizer["Att2"],
+ Type = "RenderFragment",
+ ValueList = " — ",
+ DefaultValue = " — "
+ },
+ new AttributeItem() {
+ Name = "Buttons",
+ Description = Localizer["Att3"],
+ Type = "RenderFragment",
+ ValueList = " — ",
+ DefaultValue = " — "
+ },
+ new AttributeItem() {
+ Name = nameof(EditorForm.IsDisplay),
+ Description = Localizer["IsDisplay"],
+ Type = "bool",
+ ValueList = "true/false",
+ DefaultValue = "false"
+ },
+ new AttributeItem() {
+ Name = "ShowLabel",
+ Description = Localizer["Att4"],
+ Type = "bool",
+ ValueList = "true/false",
+ DefaultValue = "true"
+ },
+ new AttributeItem() {
+ Name = "ShowLabelTooltip",
+ Description = Localizer["ShowLabelTooltip"],
+ Type = "bool?",
+ ValueList = "true/false/null",
+ DefaultValue = "null"
+ },
+ new AttributeItem() {
+ Name = "AutoGenerateAllItem",
+ Description = Localizer["Att5"],
+ Type = "bool",
+ ValueList = "true/false",
+ DefaultValue = "true"
+ },
+ new AttributeItem() {
+ Name = "ItemsPerRow",
+ Description = Localizer["Att6"],
+ Type = "int?",
+ ValueList = " — ",
+ DefaultValue = " — "
+ },
+ new AttributeItem() {
+ Name = "RowType",
+ Description = Localizer["Att7"],
+ Type = "RowType",
+ ValueList = "Row|Inline",
+ DefaultValue = "Row"
+ },
+ new AttributeItem() {
+ Name = "LabelAlign",
+ Description = Localizer["Att8"],
+ Type = "Alignment",
+ ValueList = "None|Left|Center|Right",
+ DefaultValue = "None"
+ }
};
private IEnumerable GetEditorItemAttributes() => new AttributeItem[]
{
- // TODO: 移动到数据库中
- new AttributeItem() {
- Name = "Field",
- Description = Localizer["Att9"],
- Type = "TValue",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "FieldType",
- Description = Localizer["Att10"],
- Type = "Type",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "Editable",
- Description = Localizer["Att11"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "true"
- },
- new AttributeItem() {
- Name = "Readonly",
- Description = Localizer["Att12"],
- Type = "bool",
- ValueList = "true/false",
- DefaultValue = "false"
- },
- new AttributeItem() {
- Name = "Text",
- Description = Localizer["Att13"],
- Type = "string",
- ValueList = " — ",
- DefaultValue = " — "
- },
- new AttributeItem() {
- Name = "EditTemplate",
- Description = Localizer["Att14"],
- Type = "RenderFragment