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'], '