diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor index d3527ae19d7..2a3838689a0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor @@ -11,6 +11,29 @@
@((MarkupString)Localizer["SearchTableTips"].Value)
+@((MarkupString)Localizer["SearchFormDesc"].Value)
+UseSearchForm is enabled and SearchItems is not provided, it will default to using TableColumn with Searchable=\"true\". You can customize the metadata through the SearchFormItemMetaData property in TableColumn",
+ "SearchFormDesc": "When UseSearchForm is enabled and SearchItems is not provided, it will default to using TableColumn with Searchable=\"true\". You can customize the metadata through the SearchFormItemMetadata property in TableColumn",
"SearchFormIntro": "Enable the search form feature by setting UseSearchForm=\"true\", and configure the search items within the form using SearchItems, suitable for scenarios with custom complex search conditions",
+ "SearchFormTips": "Enabling UseSearchForm will prevent SearchTemplate, CustomerSearchModel, and CustomerSearchTemplate from taking effect.",
"SearchFormTitle": "Search Form",
"SearchTableGroupBoxText": "Search Criteria",
"SearchTableIntro": "Set ShowSearch to display the query component, customize the search UI by setting the SearchTemplate template",
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index 98b254d1041..8f412d54191 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -5061,9 +5061,11 @@
"DisplayText2": "模糊搜索",
"DisplayText3": "显示清空",
"DisplayText4": "显示搜索",
+ "DisplayText5": "搜索表单",
"EditModelTitle": "编辑测试数据窗口",
"NamePlaceholder": "请输入姓名,50字以内",
- "SearchFormDesc": "使用 UseSearchForm 开启搜索表单时未提供 SearchItems 默认尝试使用设置 Searchable=\"true\" 的 TableColumn 进行构建,可以通过 TableColumn 中的 SearchFormItemMetaData 属性定制化元数据",
+ "SearchFormDesc": "使用 UseSearchForm 开启搜索表单时未提供 SearchItems 默认尝试使用设置 Searchable=\"true\" 的 TableColumn 进行构建,可以通过 TableColumn 中的 SearchFormItemMetadata 属性定制化元数据",
+ "SearchFormTips": "开启 UseSearchForm 后 SearchTemplate CustomerSearchModel CustomerSearchTemplate 均不生效",
"SearchFormIntro": "通过设置 UseSearchForm=\"true\" 开启搜索表单功能,通过 SearchItems 配置搜索表单内搜索项,适用于自定义复杂搜索条件的场景",
"SearchFormTitle": "搜索表单",
"SearchTableGroupBoxText": "搜索条件",
diff --git a/src/BootstrapBlazor.Server/wwwroot/css/site.css b/src/BootstrapBlazor.Server/wwwroot/css/site.css
index 2e76660c99a..4479a59f0e9 100644
--- a/src/BootstrapBlazor.Server/wwwroot/css/site.css
+++ b/src/BootstrapBlazor.Server/wwwroot/css/site.css
@@ -398,3 +398,21 @@ code {
.icon-list .bb-iconpark-icon {
--bb-svg-icon-width: 16px;
}
+
+.bb-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
+}
+
+.bb-grid-item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+
+ .bb-grid-item > .form-label {
+ min-width: 80px;
+ text-align: right;
+ margin-right: .5rem;
+ margin-bottom: 0;
+ }
diff --git a/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs b/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs
index d7d6c0784ef..cb307e7320e 100644
--- a/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs
+++ b/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs
@@ -180,7 +180,7 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu
bool? ITableColumn.Searchable { get => Searchable; set => Searchable = value ?? false; }
- ISearchFormItemMetaData? ITableColumn.SearchFormItemMetaData { get; set; }
+ ISearchFormItemMetadata? ITableColumn.SearchFormItemMetadata { get; set; }
bool? ITableColumn.Filterable { get => Filterable; set => Filterable = value ?? false; }
diff --git a/src/BootstrapBlazor/Components/Dialog/DialogBase.cs b/src/BootstrapBlazor/Components/Dialog/DialogBase.cs
index efd76d67d26..705718a649f 100644
--- a/src/BootstrapBlazor/Components/Dialog/DialogBase.cs
+++ b/src/BootstrapBlazor/Components/Dialog/DialogBase.cs
@@ -69,16 +69,9 @@ public abstract class DialogBase