mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
升级后台UI版本,优化js代码
This commit is contained in:
parent
a2b4ffad0c
commit
99dc0b6af7
@ -279,20 +279,19 @@ $(function () {
|
||||
};
|
||||
/*! 加载 HTML 到弹出层 */
|
||||
this.modal = function (url, data, title, callback, loading, tips, area) {
|
||||
this.load(url, data, 'GET', function (res, index) {
|
||||
this.load(url, data, 'GET', function (res) {
|
||||
if (typeof (res) === 'object') return $.msg.auto(res), false;
|
||||
index = layer.open({
|
||||
type: 1, btn: false, area: area || "800px", content: res, title: title || '', success: function (dom, index) {
|
||||
$(dom).find('[data-close]').off('click').on('click', function () {
|
||||
if (this.dataset.confirm) return $.msg.confirm(this.dataset.confirm, function (_index) {
|
||||
layer.close(_index), layer.close(index);
|
||||
}), false;
|
||||
layer.close(index);
|
||||
});
|
||||
$.form.reInit($(dom));
|
||||
$.msg.idx.push(layer.open({
|
||||
type: 1, btn: false, area: area || "800px", content: res, title: title || '', success: function ($dom, idx) {
|
||||
$dom.off('click', '[data-close]').on('click', '[data-close]', function () {
|
||||
(function (confirm, callback) {
|
||||
confirm ? $.msg.confirm(confirm, callback) : callback();
|
||||
})(this.dataset.confirm, function () {
|
||||
layer.close(idx);
|
||||
});
|
||||
}), $.form.reInit($dom);
|
||||
}
|
||||
});
|
||||
$.msg.idx.push(index);
|
||||
}));
|
||||
return (typeof callback === 'function') && callback.call(that);
|
||||
}, loading, tips);
|
||||
};
|
||||
@ -640,17 +639,19 @@ $(function () {
|
||||
}
|
||||
|
||||
/*! 注册 data-load 事件行为 */
|
||||
onEvent('click', '[data-load]', function () {
|
||||
var url = this.dataset.load, tips = this.dataset.tips, time = this.dataset.time;
|
||||
this.dataset.confirm ? $.msg.confirm(this.dataset.confirm, function () {
|
||||
$.form.load(url, {}, 'get', null, true, tips, time);
|
||||
}) : $.form.load(url, {}, 'get', null, true, tips, time);
|
||||
onEvent('click', '[data-load]', function (e) {
|
||||
(function (confirm, callback) {
|
||||
confirm ? $.msg.confirm(confirm, callback) : callback();
|
||||
})(e.target.dataset.confirm, function () {
|
||||
$.form.load(e.target.dataset.load, {}, 'get', null, true, e.target.dataset.tips, e.target.dataset.time);
|
||||
});
|
||||
});
|
||||
|
||||
/*! 注册 data-serach 表单搜索行为 */
|
||||
onEvent('submit', 'form.form-search', function () {
|
||||
var url = $(this).attr('action').replace(/&?page=\d+/g, ''), split = url.indexOf('?') === -1 ? '?' : '&';
|
||||
var url = $(this).attr('action').replace(/&?page=\d+/g, '');
|
||||
if ((this.method || 'get').toLowerCase() === 'get') {
|
||||
var split = url.indexOf('?') === -1 ? '?' : '&';
|
||||
if (location.href.indexOf('spm=') > -1) {
|
||||
return location.href = '#' + $.menu.parseUri(url + split + $(this).serialize());
|
||||
} else {
|
||||
@ -819,8 +820,8 @@ $(function () {
|
||||
|
||||
/*! 表单编辑返回操作 */
|
||||
onEvent('click', '[data-history-back]', function () {
|
||||
$.msg.confirm(this.dataset.historyBack || '确定要返回吗?', function (index) {
|
||||
history.back(), $.msg.close(index);
|
||||
$.msg.confirm(this.dataset.historyBack || '确定要返回吗?', function () {
|
||||
history.back();
|
||||
})
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -18,18 +18,25 @@
|
||||
@TopHeaderBackColor: #393D49;
|
||||
|
||||
// 导航条按钮颜色
|
||||
@TopHeaderNavNormalTextColor: #EEEEEE;
|
||||
@TopHeaderNavNormalBackColor: #393D49;
|
||||
@TopHeaderNavHoverTextColor: #EFEFEF;
|
||||
@TopHeaderNavHoverBackColor: #393D49;
|
||||
@TopHeaderNavActiveTextColor: #FFFFFF;
|
||||
@TopHeaderNavHoverBackColor: rgba(0, 0, 0, 0.1);
|
||||
|
||||
@TopHeaderNavNormalTextColor: #EEE;
|
||||
@TopHeaderNavNormalBackColor: rgba(0, 0, 0, 0);
|
||||
|
||||
@TopHeaderNavActiveTextColor: #FFF;
|
||||
@TopHeaderNavActiveBackColor: #098;
|
||||
|
||||
// 左侧菜单布局颜色
|
||||
@LeftMainBackColor: #393D49 !important;
|
||||
@LeftMainSubBackColor: rgba(0, 0, 0, .3) !important;
|
||||
|
||||
@LeftMainNavHoverBackColor: hsla(0, 0%, 39%, .2) !important;
|
||||
@LeftMainNavHoverTextColor: #fff;
|
||||
|
||||
@LeftMainNavNormalBackColor: none;
|
||||
@LeftMainNavNormalTextColor: #fff;
|
||||
|
||||
@LeftMainNavActiveBackColor: #098;
|
||||
@LeftMainNavActiveTextColor: #fff;
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -58,18 +58,18 @@ fieldset {
|
||||
}
|
||||
|
||||
.layui-tab, .layui-card {
|
||||
border-radius: @BoxBorderColor;
|
||||
border-radius: @BoxBorderRadius;
|
||||
}
|
||||
|
||||
.layui-tab {
|
||||
.layui-tab-title {
|
||||
border-top-left-radius: @BoxBorderColor;
|
||||
border-top-right-radius: @BoxBorderColor;
|
||||
border-top-left-radius: @BoxBorderRadius;
|
||||
border-top-right-radius: @BoxBorderRadius;
|
||||
|
||||
> li:first-child {
|
||||
padding: 0 15px 0 17px;
|
||||
margin-left: 0 !important;
|
||||
border-top-left-radius: @BoxBorderColor;
|
||||
border-top-left-radius: @BoxBorderRadius;
|
||||
|
||||
&:after {
|
||||
border-left: none
|
||||
@ -78,8 +78,8 @@ fieldset {
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
border-bottom-left-radius: @BoxBorderColor;
|
||||
border-bottom-right-radius: @BoxBorderColor;
|
||||
border-bottom-left-radius: @BoxBorderRadius;
|
||||
border-bottom-right-radius: @BoxBorderRadius;
|
||||
}
|
||||
|
||||
> .layui-tab-content {
|
||||
@ -99,7 +99,7 @@ fieldset {
|
||||
}
|
||||
|
||||
.layui-code {
|
||||
border-radius: @BoxBorderColor;
|
||||
border-radius: @BoxBorderRadius;
|
||||
}
|
||||
|
||||
.layui-btn {
|
||||
@ -122,7 +122,7 @@ fieldset {
|
||||
}
|
||||
|
||||
&-disabled {
|
||||
border: 1px solid @BoxBorderRadius;
|
||||
border: 1px solid @BoxBorderColor;
|
||||
}
|
||||
|
||||
&-primary {
|
||||
@ -466,7 +466,7 @@ label.think-radio, label.think-checkbox {
|
||||
position: relative;
|
||||
background: url(../img/wechat/mobile_head.png) no-repeat 0 0;
|
||||
box-shadow: @MinOuterShadow;
|
||||
border-radius: @BoxBorderColor;
|
||||
border-radius: @BoxBorderRadius;
|
||||
|
||||
.mobile-header {
|
||||
color: #fff;
|
||||
@ -494,7 +494,7 @@ label.think-radio, label.think-checkbox {
|
||||
border: 1px solid #ccc;
|
||||
position: absolute;
|
||||
background: #f5f5f5;
|
||||
border-radius: 0 0 @BoxBorderColor @BoxBorderColor;
|
||||
border-radius: 0 0 @BoxBorderRadius @BoxBorderRadius;
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
@ -512,7 +512,7 @@ label.think-radio, label.think-checkbox {
|
||||
padding-left: 43px;
|
||||
background: url(../img/wechat/mobile_foot.png) no-repeat 0 0;
|
||||
list-style-type: none;
|
||||
border-radius: 0 0 @BoxBorderColor @BoxBorderColor;
|
||||
border-radius: 0 0 @BoxBorderRadius @BoxBorderRadius;
|
||||
|
||||
li {
|
||||
float: left;
|
||||
@ -670,6 +670,7 @@ label.think-radio, label.think-checkbox {
|
||||
width: auto;
|
||||
height: auto;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@ -716,7 +717,7 @@ label.think-radio, label.think-checkbox {
|
||||
height: 100%;
|
||||
z-index: 9999999;
|
||||
position: fixed;
|
||||
background-color: #E9E7E7;
|
||||
background-color: @LoadBackColor;
|
||||
|
||||
.loader {
|
||||
top: 50%;
|
||||
@ -725,7 +726,7 @@ label.think-radio, label.think-checkbox {
|
||||
margin: -30px auto 40px;
|
||||
z-index: 999999;
|
||||
position: relative;
|
||||
background-color: #E9E7E7;
|
||||
background-color: @LoadBackColor;
|
||||
}
|
||||
|
||||
.loader:before {
|
||||
|
@ -144,6 +144,12 @@
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
|
||||
&:after {
|
||||
height: 50px;
|
||||
display: block;
|
||||
content: '';
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 3px !important;
|
||||
|
||||
@ -160,6 +166,7 @@
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .2);
|
||||
|
||||
.layui-nav-child {
|
||||
padding: 0;
|
||||
background-color: @LeftMainSubBackColor;
|
||||
}
|
||||
|
||||
@ -177,9 +184,12 @@
|
||||
height: 45px;
|
||||
display: block;
|
||||
line-height: 45px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
|
||||
&:hover {
|
||||
background: hsla(0, 0%, 39%, .2) !important
|
||||
color: @LeftMainNavHoverTextColor;
|
||||
background: @LeftMainNavHoverBackColor
|
||||
}
|
||||
|
||||
.nav-icon, .nav-text {
|
||||
|
Loading…
x
Reference in New Issue
Block a user