From 86622f169c56ae6f46166b833f1930be81fddd3c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 18 Jan 2020 16:07:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?db:=20=E5=A2=9E=E5=8A=A0=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9B=BA=E5=AE=9A=E8=A1=A8=E5=A4=B4=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/MongoDB/Dicts.js | 6 ++++++ db/MySQL/initData.sql | 1 + db/Oracle/InitData.sql | 1 + db/Postgresql/initData.sql | 1 + db/SQLite/InitData.sql | 1 + db/SqlServer/InitData.sql | 1 + src/admin/Bootstrap.Admin/BootstrapAdmin.db | Bin 102400 -> 102400 bytes 7 files changed, 11 insertions(+) diff --git a/db/MongoDB/Dicts.js b/db/MongoDB/Dicts.js index dd581008..067efec8 100644 --- a/db/MongoDB/Dicts.js +++ b/db/MongoDB/Dicts.js @@ -270,6 +270,12 @@ "Code": "1", "Define": NumberInt(0) }, + { + "Category": "网站设置", + "Name": "固定表头", + "Code": "1", + "Define": NumberInt(0) + }, { "Category": "网站设置", "Name": "OAuth 认证登录", diff --git a/db/MySQL/initData.sql b/db/MySQL/initData.sql index 1b756e48..27f691d0 100644 --- a/db/MySQL/initData.sql +++ b/db/MySQL/initData.sql @@ -32,6 +32,7 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台 -- 网站UI设置 INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0); INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0); +INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0); -- 登录配置 INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0); diff --git a/db/Oracle/InitData.sql b/db/Oracle/InitData.sql index 847c8ea3..60084694 100644 --- a/db/Oracle/InitData.sql +++ b/db/Oracle/InitData.sql @@ -32,6 +32,7 @@ INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVA -- 网站UI设置 INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '侧边栏状态', '1', 0); INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '卡片标题状态', '1', 0); +INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '固定表头', '1', 0); -- 登录配置 INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '短信验证码登录', '1', 0); diff --git a/db/Postgresql/initData.sql b/db/Postgresql/initData.sql index 01197c1a..e8e816ee 100644 --- a/db/Postgresql/initData.sql +++ b/db/Postgresql/initData.sql @@ -32,6 +32,7 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台 -- 网站UI设置 INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0); INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0); +INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0); -- 登录配置 INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0); diff --git a/db/SQLite/InitData.sql b/db/SQLite/InitData.sql index ccbb0069..0ff7caa0 100644 --- a/db/SQLite/InitData.sql +++ b/db/SQLite/InitData.sql @@ -32,6 +32,7 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置 -- 网站UI设置 INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '侧边栏状态', '1', 0); INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '卡片标题状态', '1', 0); +INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '固定表头', '1', 0); -- 登录配置 INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '短信验证码登录', '1', 0); diff --git a/db/SqlServer/InitData.sql b/db/SqlServer/InitData.sql index fa43dd37..32bc3146 100644 --- a/db/SqlServer/InitData.sql +++ b/db/SqlServer/InitData.sql @@ -35,6 +35,7 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设 -- 网站UI设置 INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'侧边栏状态', N'1', 0) INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'卡片标题状态', N'1', 0) +INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'固定表头', N'1', 0) -- 登录配置 INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'短信验证码登录', N'1', 0) diff --git a/src/admin/Bootstrap.Admin/BootstrapAdmin.db b/src/admin/Bootstrap.Admin/BootstrapAdmin.db index 78df37583af19a79016fd829b7c18ba5a31263da..2ad6771db339017da9c777015643f14cb3922e87 100644 GIT binary patch delta 74 zcmV-Q0JZ;spay`T29O&8K#?3n0YI@}q|XC226>YQ&}jk&d9x7^2L>S@W(EKyB@YPa gy^-gundq**=e@4wo4Vz$n&_dZ<)pMRvzpdsx%i Date: Sat, 18 Jan 2020 15:38:24 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(#I18IU2):=20=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I18IU2 #Issue link https://gitee.com/LongbowEnterprise/dashboard/issues?id=I18IU2 --- .../Controllers/Api/SettingsController.cs | 4 +- .../Bootstrap.Admin/Models/AdminModel.cs | 6 +++ .../Pages/Components/SettingsBase.cs | 15 ++++-- .../Views/Admin/Settings.cshtml | 4 ++ .../Views/Shared/_Default.cshtml | 2 +- .../Bootstrap.Admin/wwwroot/css/site.css | 6 ++- .../Bootstrap.Admin/wwwroot/js/settings.js | 30 +++++------ .../wwwroot/lib/longbow/longbow.common.js | 50 ++++++++++++++++++- .../Bootstrap.DataAccess.MongoDB/Dict.cs | 8 +-- src/admin/Bootstrap.DataAccess/Dict.cs | 12 +++-- .../Bootstrap.DataAccess/Helper/DictHelper.cs | 12 +++-- 11 files changed, 114 insertions(+), 35 deletions(-) diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs index 917bfa6b..2628f8f7 100644 --- a/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs +++ b/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs @@ -19,11 +19,11 @@ namespace Bootstrap.Admin.Controllers.Api /// /// 保存网站设置方法 /// - /// + /// /// [HttpPost] [ButtonAuthorize(Url = "~/Admin/Settings", Auth = "saveTitle,saveFooter,saveTheme,saveUISettings,clearCache,clearAllCache,loginSettings,lockScreen,defaultApp,blazor")] - public bool Post([FromBody]BootstrapDict value) => DictHelper.SaveSettings(value); + public bool Post([FromBody]IEnumerable values) => DictHelper.SaveSettings(values); /// /// 获取网站缓存站点集合 diff --git a/src/admin/Bootstrap.Admin/Models/AdminModel.cs b/src/admin/Bootstrap.Admin/Models/AdminModel.cs index a73ee8b3..b212290d 100644 --- a/src/admin/Bootstrap.Admin/Models/AdminModel.cs +++ b/src/admin/Bootstrap.Admin/Models/AdminModel.cs @@ -28,6 +28,7 @@ namespace Bootstrap.Admin.Models ShowOAuth = AllowOAuth ? "" : "oauth"; LockScreenPeriod = DictHelper.RetrieveAutoLockScreenPeriod(); EnableAutoLockScreen = DictHelper.RetrieveAutoLockScreen(); + FixedTableHeader = DictHelper.RetrieveFixedTableHeader() ? "" : "scroll"; } /// @@ -89,5 +90,10 @@ namespace Bootstrap.Admin.Models /// 获得 自动锁屏功能是否自动开启 默认关闭 /// public bool EnableAutoLockScreen { get; } + + /// + /// 获得 是否固定表头 + /// + public string FixedTableHeader { get; } } } diff --git a/src/admin/Bootstrap.Admin/Pages/Components/SettingsBase.cs b/src/admin/Bootstrap.Admin/Pages/Components/SettingsBase.cs index b3738b84..a88b16ba 100644 --- a/src/admin/Bootstrap.Admin/Pages/Components/SettingsBase.cs +++ b/src/admin/Bootstrap.Admin/Pages/Components/SettingsBase.cs @@ -51,6 +51,7 @@ namespace Bootstrap.Pages.Admin.Components Model.LockScreenPeriod = DictHelper.RetrieveAutoLockScreenPeriod(); Model.DefaultApp = DictHelper.RetrieveDefaultApp(); Model.EnableBlazor = DictHelper.RetrieveEnableBlazor(); + Model.FixedTableHeader = DictHelper.RetrieveFixedTableHeader(); Model.Themes = DictHelper.RetrieveThemes(); } @@ -59,7 +60,7 @@ namespace Bootstrap.Pages.Admin.Components /// protected void SaveBlazor() { - var ret = DictHelper.SaveSettings(new BootstrapDict() { Category = "网站设置", Name = "Blazor", Code = Model.EnableBlazor ? "1" : "0" }); + var ret = DictHelper.SaveSettings(new BootstrapDict[] { new BootstrapDict() { Category = "网站设置", Name = "Blazor", Code = Model.EnableBlazor ? "1" : "0" } }); if (Model.EnableBlazor) ShowMessage("Blazor 设置保存", ret); else { @@ -73,8 +74,11 @@ namespace Bootstrap.Pages.Admin.Components /// protected void SaveSidebar() { - var ret = DictHelper.SaveSettings(new BootstrapDict() { Category = "网站调整", Name = "侧边栏状态", Code = Model.ShowSideBar ? "1" : "0" }) && - DictHelper.SaveSettings(new BootstrapDict() { Category = "网站调整", Name = "卡片标题状态", Code = Model.ShowCardTitle ? "1" : "0" }); + var ret = DictHelper.SaveSettings(new BootstrapDict[]{ + new BootstrapDict() { Category = "网站调整", Name = "侧边栏状态", Code = Model.ShowSideBar ? "1" : "0" }, + new BootstrapDict() { Category = "网站调整", Name = "卡片标题状态", Code = Model.ShowCardTitle ? "1" : "0" }, + new BootstrapDict() { Category = "网站调整", Name = "固定表头", Code = Model.FixedTableHeader ? "1" : "0" } + }); ShowMessage("网站调整 设置保存", ret); } /// @@ -137,6 +141,11 @@ namespace Bootstrap.Pages.Admin.Components /// public bool EnableBlazor { get; set; } + /// + /// 获得/设置 是否固定表头 + /// + public bool FixedTableHeader { get; set; } + /// /// 获得/设置 系统样式集合 /// diff --git a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml index 15f9203e..2c149d2f 100644 --- a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml @@ -93,6 +93,10 @@ +
+ + +
@await RenderSectionAsync("cardbody", false) -
+
diff --git a/src/admin/Bootstrap.Admin/wwwroot/css/site.css b/src/admin/Bootstrap.Admin/wwwroot/css/site.css index 8eb90e28..6cc439ca 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/css/site.css +++ b/src/admin/Bootstrap.Admin/wwwroot/css/site.css @@ -534,4 +534,8 @@ pre { .modal-query .form-group input.form-control { flex: 1 1 auto; - } \ No newline at end of file + } + + .bootstrap-table .fixed-table-toolbar .bs-bars, .bootstrap-table .fixed-table-toolbar .columns { + margin-bottom: 0; +} diff --git a/src/admin/Bootstrap.Admin/wwwroot/js/settings.js b/src/admin/Bootstrap.Admin/wwwroot/js/settings.js index 8c81dc07..816b065e 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/js/settings.js +++ b/src/admin/Bootstrap.Admin/wwwroot/js/settings.js @@ -11,7 +11,7 @@ $(function () { case 'footer': data = dataBinder.get(); $.bc({ - url: Settings.url, data: { name: '网站页脚', code: data.Footer, category: '网站设置' }, title: '保存网站页脚', method: "post", + url: Settings.url, data: [{ name: '网站页脚', code: data.Footer, category: '网站设置' }], title: '保存网站页脚', method: "post", callback: function (result) { if (result) $('#websiteFooter').text(data.Footer); } @@ -20,7 +20,7 @@ $(function () { case 'title': data = dataBinder.get(); $.bc({ - url: Settings.url, data: { name: '网站标题', code: data.Title, category: '网站设置' }, title: '保存网站标题', method: "post", + url: Settings.url, data: [{ name: '网站标题', code: data.Title, category: '网站设置' }], title: '保存网站标题', method: "post", callback: function (result) { if (result) $('#websiteTitle').text(data.Title); } @@ -29,7 +29,7 @@ $(function () { case 'css': var cssDefine = $css.val(); $.bc({ - url: Settings.url, data: { name: '使用样式', code: cssDefine, category: '当前样式' }, title: '保存网站样式', method: "post", + url: Settings.url, data: [{ name: '使用样式', code: cssDefine, category: '当前样式' }], title: '保存网站样式', method: "post", callback: function (result) { if (result) { window.setTimeout(function () { window.location.reload(true); }, 1000); @@ -39,12 +39,14 @@ $(function () { break; case 'UISettings': var uiSettings = $('#sider').prop('checked') ? "1" : "0"; - $.bc({ - url: Settings.url, data: { name: '侧边栏状态', code: uiSettings, category: '网站设置' }, method: "post" - }); var cardTitle = $('#cardTitle').prop('checked') ? "1" : "0"; + var fixedTableHeader = $('#tableHeader').prop('checked') ? "1" : "0"; $.bc({ - url: Settings.url, data: { name: '卡片标题状态', code: cardTitle, category: '网站设置' }, title: '保存网站设置', method: "post", + url: Settings.url, data: [ + { name: '卡片标题状态', code: cardTitle, category: '网站设置' }, + { name: '侧边栏状态', code: uiSettings, category: '网站设置' }, + { name: '固定表头', code: fixedTableHeader, category: '网站设置' } + ], title: '保存网站设置', method: "post", callback: function (result) { if (result) { window.setTimeout(function () { window.location.reload(true); }, 1000); @@ -54,21 +56,15 @@ $(function () { break; case 'loginSettings': var mobile = $('#mobile').prop('checked') ? "1" : "0"; - $.bc({ - url: Settings.url, data: { name: '短信验证码登录', code: mobile, category: '网站设置' }, method: "post" - }); var oauth = $('#oauth').prop('checked') ? "1" : "0"; $.bc({ - url: Settings.url, data: { name: 'OAuth 认证登录', code: oauth, category: '网站设置' }, title: '登录设置', method: "post" + url: Settings.url, data: [{ name: 'OAuth 认证登录', code: oauth, category: '网站设置' }, { name: '短信验证码登录', code: mobile, category: '网站设置' }], title: '登录设置', method: "post" }); break; case 'saveAutoLock': var autoLock = $('#lockScreen').prop('checked') ? "1" : "0"; $.bc({ - url: Settings.url, data: { name: '自动锁屏', code: autoLock, category: '网站设置' }, method: "post" - }); - $.bc({ - url: Settings.url, data: { name: '自动锁屏时长', code: $('#lockPeriod').val(), category: '网站设置' }, title: '保存自动锁屏设置', method: "post", + url: Settings.url, data: [{ name: '自动锁屏', code: autoLock, category: '网站设置' }, { name: '自动锁屏时长', code: $('#lockPeriod').val(), category: '网站设置' }], title: '保存自动锁屏设置', method: "post", callback: function (result) { if (result) { window.setTimeout(function () { window.location.reload(true); }, 1000); @@ -79,13 +75,13 @@ $(function () { case 'saveDefaultApp': var defaultApp = $('#defaultApp').prop('checked') ? "1" : "0"; $.bc({ - url: Settings.url, data: { name: '默认应用程序', code: defaultApp, category: '网站设置' }, title: '保存默认应用程序设置', method: "post" + url: Settings.url, data: [{ name: '默认应用程序', code: defaultApp, category: '网站设置' }], title: '保存默认应用程序设置', method: "post" }); break; case 'saveBlazor': var blazor = $('#blazor').prop('checked') ? "1" : "0"; $.bc({ - url: Settings.url, data: { name: 'Blazor', code: blazor, category: '网站设置' }, title: 'Blazor 设置', method: "post", + url: Settings.url, data: [{ name: 'Blazor', code: blazor, category: '网站设置' }], title: 'Blazor 设置', method: "post", callback: function (result) { if (result) { // 导航到 Blazor 页面 diff --git a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js index 75366526..c549bd57 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js +++ b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js @@ -90,7 +90,7 @@ }; $.extend({ - "format": function (source, params) { + format: function (source, params) { if (params === undefined || params === null) { return null; } @@ -354,7 +354,11 @@ showExport: true, exportTypes: ['csv', 'txt', 'excel'], advancedSearchModal: '#dialogAdvancedSearch', + minHeight: 400, + height: undefined, + calcHeight: undefined, search: true, + tableContainer: '.main-content', searchOnEnterKey: false, searchTimeOut: 0, showSearchClearButton: true, @@ -367,6 +371,16 @@ cardView: $(window).width() < 768, //是否显示详细视图 queryButton: '#btn_query', onLoadSuccess: function (data) { + // 设置 数据库 滚动条 + if (settings.height !== undefined) { + $('.bootstrap-table .fixed-table-body').overlayScrollbars({ + className: 'os-theme-dark', + scrollbars: { + autoHide: 'leave', + autoHideDelay: 100 + } + }); + } $.footer(); if (data.IsSuccess === false) { toastr.error(data.HttpResult.Message, data.HttpResult.Name); @@ -420,7 +434,41 @@ } }); } + + // 判断是否固定表头 + var fixHeader = this.attr('data-fixedHeader') === ''; + var $tabContainer = $(settings.tableContainer); + if (fixHeader && settings.height === undefined) { + if (settings.calcHeight === undefined) { + settings.calcHeight = function () { + var marginHeight = 0; + if ($tabContainer.length === 1) { + marginHeight = $tabContainer.outerHeight() - $tabContainer.height(); + } + + // 38: card-header + return Math.max(settings.minHeight, $(window).height() - $('header').height() - $('footer').height() - (marginHeight * 2) - 38 - 32 - 10); + }; + } + + // 设置最小高度为 + settings.height = settings.calcHeight(); + + // 设置 onresize 事件 + $(window).on('resize', this, function (event) { + event.data.bootstrapTable('resetView', { height: settings.calcHeight() }); + }); + } + + // 加载数据 this.bootstrapTable(settings); + + // 如果固定表头 禁止容器滚动条出现 + if (fixHeader && $tabContainer.length > 0) { + $tabContainer.addClass('overflow-hidden'); + } + + // 格式化工具栏 $('.bootstrap-table .fixed-table-toolbar .columns .export .dropdown-menu').addClass("dropdown-menu-right"); var $gear = $(settings.toolbar).removeClass('d-none').find('.gear'); if ($gear.find('.dropdown-menu > a').length === 0) $gear.addClass('d-none'); diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs b/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs index 3ad15531..a0fd4056 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs @@ -56,13 +56,13 @@ namespace Bootstrap.DataAccess.MongoDB } /// - /// + /// 保存网站设置方法 /// - /// + /// /// - public override bool SaveSettings(BootstrapDict dict) + public override bool SaveSettings(IEnumerable dicts) { - DbManager.Dicts.FindOneAndUpdate(md => md.Category == dict.Category && md.Name == dict.Name, Builders.Update.Set(md => md.Code, dict.Code)); + dicts.ToList().ForEach(dict => DbManager.Dicts.FindOneAndUpdate(md => md.Category == dict.Category && md.Name == dict.Name, Builders.Update.Set(md => md.Code, dict.Code))); return true; } diff --git a/src/admin/Bootstrap.DataAccess/Dict.cs b/src/admin/Bootstrap.DataAccess/Dict.cs index aa247b6e..1ff3eece 100644 --- a/src/admin/Bootstrap.DataAccess/Dict.cs +++ b/src/admin/Bootstrap.DataAccess/Dict.cs @@ -48,12 +48,12 @@ namespace Bootstrap.DataAccess /// /// 保存网站个性化设置 /// - /// + /// /// - public virtual bool SaveSettings(BootstrapDict dict) + public virtual bool SaveSettings(IEnumerable dicts) { using var db = DbManager.Create(); - db.Update("set Code = @Code where Category = @Category and Name = @Name", dict); + dicts.ToList().ForEach(dict => db.Update("set Code = @Code where Category = @Category and Name = @Name", dict)); return true; } @@ -290,5 +290,11 @@ namespace Bootstrap.DataAccess /// /// public bool RetrieveEnableBlazor() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Category == "网站设置" && d.Name == "Blazor" && d.Define == 0)?.Code ?? "0") == "1"; + + /// + /// 获得是否开启 固定表头 功能 默认开启 + /// + /// + public bool RetrieveFixedTableHeader() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Category == "网站设置" && d.Name == "固定表头" && d.Define == 0)?.Code ?? "1") == "1"; } } diff --git a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs index 15dc1bf1..b6216c13 100644 --- a/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs +++ b/src/admin/Bootstrap.DataAccess/Helper/DictHelper.cs @@ -106,11 +106,11 @@ namespace Bootstrap.DataAccess /// /// 保存网站个性化设置 /// - /// + /// /// - public static bool SaveSettings(BootstrapDict dict) + public static bool SaveSettings(IEnumerable dicts) { - var ret = DbContextManager.Create()?.SaveSettings(dict) ?? false; + var ret = DbContextManager.Create()?.SaveSettings(dicts) ?? false; if (ret) CacheCleanUtility.ClearCache(dictIds: new List()); return ret; } @@ -275,5 +275,11 @@ namespace Bootstrap.DataAccess /// /// public static bool RetrieveEnableBlazor() => DbContextManager.Create()?.RetrieveEnableBlazor() ?? false; + + /// + /// 获得是否开启 固定表头 默认开启 + /// + /// + public static bool RetrieveFixedTableHeader() => DbContextManager.Create()?.RetrieveFixedTableHeader() ?? false; } } From 217d432b72ac04f0f2749d4c1f82f363c43df273 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 18 Jan 2020 17:47:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(#I18IU2):=20blazor=20=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E8=AE=BE=E7=BD=AE=E5=A2=9E=E5=8A=A0=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Issue link https://gitee.com/LongbowEnterprise/dashboard/issues?id=I18IU2 --- src/admin/Bootstrap.Admin/Pages/Admin/Settings.razor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/admin/Bootstrap.Admin/Pages/Admin/Settings.razor b/src/admin/Bootstrap.Admin/Pages/Admin/Settings.razor index d8efa1f0..51ff0bc3 100644 --- a/src/admin/Bootstrap.Admin/Pages/Admin/Settings.razor +++ b/src/admin/Bootstrap.Admin/Pages/Admin/Settings.razor @@ -83,6 +83,10 @@
+
+ + +