From 8fa71bfef13be431b59fcda4a4107b4448fdab2c Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 13 Feb 2022 00:49:47 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20table=20=E7=BB=84=E4=BB=B6=E7=BC=96?= =?UTF-8?q?=E8=BE=91/=E6=90=9C=E7=B4=A2=E5=BC=B9=E7=AA=97=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=9C=80=E5=A4=A7=E5=8C=96=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Table/Table.razor.Search.cs | 11 +++++++++-- .../Components/Table/Table.razor.Toolbar.cs | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs index ee0330848..6e1f824b0 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs @@ -157,11 +157,17 @@ public partial class Table public Size SearchDialogSize { get; set; } = Size.Large; /// - /// 获得/设置 搜索框是否可以拖拽 + /// 获得/设置 搜索框是否可以拖拽 默认 false 不可以拖拽 /// [Parameter] public bool SearchDialogIsDraggable { get; set; } + /// + /// 获得/设置 搜索框是否显示最大化按钮 默认 false 不显示 + /// + [Parameter] + public bool SearchDialogShowMaximizeButton { get; set; } + /// /// 高级查询按钮点击时调用此方法 /// @@ -189,7 +195,8 @@ public partial class Table LabelAlign = SearchDialogLabelAlign, Size = SearchDialogSize, Items = Columns.Where(i => i.Searchable), - IsDraggable = SearchDialogIsDraggable + IsDraggable = SearchDialogIsDraggable, + ShowMaximizeButton = SearchDialogShowMaximizeButton }; SearchDialogOption CreateCustomerModelDialog() => new() diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index 2ca22dddc..a25d6d8f5 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -487,10 +487,16 @@ public partial class Table public Size EditDialogSize { get; set; } = Size.Large; /// - /// 获得/设置 编辑框是否可以拖拽 + /// 获得/设置 编辑框是否可以拖拽 默认 false 不可以拖拽 /// [Parameter] - public bool EditDialogDraggable { get; set; } + public bool EditDialogIsDraggable { get; set; } + + /// + /// 获得/设置 编辑框是否显示最大化按钮 默认 false 不显示 + /// + [Parameter] + public bool EditDialogShowMaximizeButton { get; set; } /// /// 弹出编辑对话框方法 @@ -514,7 +520,8 @@ public partial class Table LabelAlign = EditDialogLabelAlign, ItemChangedType = changedType, Size = EditDialogSize, - IsDraggable = EditDialogDraggable, + IsDraggable = EditDialogIsDraggable, + ShowMaximizeButton = EditDialogShowMaximizeButton, OnCloseAsync = async () => { var d = DataService ?? InjectDataService; -- Gitee From 113f55a79cb0f9a6f346ecb77f9fbca3e47d516e Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 13 Feb 2022 00:50:04 +0800 Subject: [PATCH 2/8] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Samples/Table/Tables.razor.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs b/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs index 2b4cee72d..b0dd39ea5 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs +++ b/src/BootstrapBlazor.Shared/Samples/Table/Tables.razor.cs @@ -655,12 +655,19 @@ public partial class Tables DefaultValue = " — " }, new() { - Name = "EditDialogDraggable", + Name = nameof(Table.EditDialogIsDraggable), Description = "编辑弹窗是否可拖拽", Type = "bool", ValueList = "true|false", DefaultValue = "false" }, + new() { + Name = nameof(Table.EditDialogShowMaximizeButton), + Description = "编辑弹窗是否显示最大化按钮", + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" + }, new() { Name = "EditDialogSize", Description = "编辑弹窗大小", @@ -669,12 +676,19 @@ public partial class Tables DefaultValue = "Large" }, new() { - Name = "SearchDialogIsDraggable", + Name = nameof(Table.SearchDialogIsDraggable), Description = "搜索弹窗是否可拖拽", Type = "bool", ValueList = "true|false", DefaultValue = "false" }, + new() { + Name = nameof(Table.SearchDialogShowMaximizeButton), + Description = "搜索弹窗是否显示最大化按钮", + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" + }, new() { Name = "SearchDialogSize", Description = "搜索弹窗大小", -- Gitee From 9f522ff37e0dc50fe27f9c058270a7f68f0f5c39 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 13 Feb 2022 01:03:27 +0800 Subject: [PATCH 3/8] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=9C=80=E5=A4=A7=E5=8C=96=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Samples/Table/TablesEdit.razor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Samples/Table/TablesEdit.razor b/src/BootstrapBlazor.Shared/Samples/Table/TablesEdit.razor index a2edeeb11..bf816e33d 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/TablesEdit.razor +++ b/src/BootstrapBlazor.Shared/Samples/Table/TablesEdit.razor @@ -54,7 +54,7 @@

通过设置 EditDialogDraggable="true" 使编辑弹出框可拖拽

@@ -77,7 +77,7 @@
@@ -175,9 +175,10 @@

自定义数据服务

开启使用注入数据服务后,可通过设置 DataServices 参数对组件进行单独设置,如未设置内部使用注入服务提供的实例
+
本例中通过设置 EditDialogShowMaximizeButton 参数,使编辑弹窗中显示 最大化 按钮

services.AddTableDemoDataService();
-
-- Gitee From 324bf6ca989db760c744eb6bbbf18ed628205ea8 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Sun, 13 Feb 2022 01:06:13 +0800 Subject: [PATCH 4/8] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=9C=80=E5=A4=A7=E5=8C=96=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Shared/Samples/Table/TablesSearch.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Samples/Table/TablesSearch.razor b/src/BootstrapBlazor.Shared/Samples/Table/TablesSearch.razor index 1bfab7bad..f67392527 100644 --- a/src/BootstrapBlazor.Shared/Samples/Table/TablesSearch.razor +++ b/src/BootstrapBlazor.Shared/Samples/Table/TablesSearch.razor @@ -44,7 +44,7 @@ -

列信息绑定时通过设置 Searchable 属性,设置搜索条件自动构建 UI

+

列信息绑定时通过设置 Searchable 属性,设置搜索条件自动构建 UI,可通过设置 SearchDialogShowMaximizeButton 使搜索弹窗显示 最大化 按钮

自动构建搜索弹窗时,由于各列设置 Searchable 此时组件会通过 SearchText 与设置 Searchable 值为 true 的各列自动构建搜索拉姆达表达式,通过 QueryPageOptions 的属性 Searchs 获得

@@ -71,7 +71,7 @@
Date: Sun, 13 Feb 2022 01:16:56 +0800 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=E5=8F=AF?= =?UTF-8?q?=E6=8B=96=E5=8A=A8=E8=84=9A=E6=9C=AC=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Modal/Modal.js | 2 -- src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js | 2 +- src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.min.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/BootstrapBlazor/Components/Modal/Modal.js b/src/BootstrapBlazor/Components/Modal/Modal.js index 921bb09c9..6f2cf91a0 100644 --- a/src/BootstrapBlazor/Components/Modal/Modal.js +++ b/src/BootstrapBlazor/Components/Modal/Modal.js @@ -24,9 +24,7 @@ pt.top = parseInt($el.css('marginTop').replace("px", "")); pt.left = parseInt($el.css('marginLeft').replace("px", "")); - // 移除 Center 样式 $el.css({ "marginLeft": pt.left, "marginTop": pt.top }); - $el.removeClass('modal-dialog-centered'); // 固定大小 $el.css("width", dialogWidth); diff --git a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js index ae6349764..951885b08 100644 --- a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js +++ b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js @@ -13,4 +13,4 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this /*! Summernote v0.8.18 | (c) 2013- Alan Hong and other contributors | MIT license */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.jQuery);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(function(t){return(()=>{"use strict";var e={9458:e=>{e.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.amdO={},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var t=o(9458),e=o.n(t);function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n'),u=s('