From 30af02bf243517a5602672e399ec8b4a90051602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Sat, 1 Aug 2020 20:31:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E8=A1=A8=E5=8D=95=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/css/pear-module/form.css | 15 +++++++++ component/pear/module/admin.js | 12 +++++++ component/pear/module/menu.js | 4 +-- view/document/form.html | 44 +++++++++++++++---------- 4 files changed, 54 insertions(+), 21 deletions(-) diff --git a/component/pear/css/pear-module/form.css b/component/pear/css/pear-module/form.css index b624d7a..0014675 100644 --- a/component/pear/css/pear-module/form.css +++ b/component/pear/css/pear-module/form.css @@ -16,3 +16,18 @@ top: 5px; left: 15px; } + +.layui-input[hover]:focus { + box-shadow: 0px 0px 3px 1px #5FB878 !important; + border: #5FB878 1px solid; +} + +.layui-input[success] { + box-shadow: 0px 0px 3px 1px #5FB878 !important; + border: #5FB878 1px solid; +} + +.layui-input[failure] { + box-shadow: 0px 0px 3px 1px #F56C6C; + border: #F56C6C 1px solid; +} diff --git a/component/pear/module/admin.js b/component/pear/module/admin.js index 3901d22..01731aa 100644 --- a/component/pear/module/admin.js +++ b/component/pear/module/admin.js @@ -14,6 +14,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], var bodyTab; var pearAdmin = new function() { + this.render = function(option) { var option = getData(); this.menuRender(option); @@ -22,10 +23,12 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], this.logoRender(option); this.themeRender(option); } + this.logoRender = function(option) { $(".layui-logo .logo").attr("src", option.logo.image); $(".layui-logo .title").html(option.logo.title); } + this.menuRender = function(option) { sideMenu = pearMenu.render({ elem: 'sideMenu', //依赖容器 @@ -41,6 +44,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], }) sideMenu.selectItem(option.menu.select); } + this.bodyRender = function(option) { if (option.tab.muiltTab) { bodyTab = pearTab.render({ @@ -126,12 +130,14 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], }) } } + this.keepLoad = function(option) { compatible() setTimeout(function() { $(".loader-main").fadeOut(option.done); }, option.other.keepLoad) } + this.themeRender = function(option) { if (option.theme.allowCustom == false) { @@ -153,11 +159,13 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], this.colorSet(color.color); this.menuSkin(menu); } + this.menuSkin = function(theme) { $(".pear-admin").removeClass("light-theme"); $(".pear-admin").removeClass("dark-theme"); $(".pear-admin").addClass(theme); } + this.colorSet = function(color) { var style = ''; @@ -328,6 +336,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], '