😆 publish version to 3.8.10
parent
072374c4ef
commit
b645a8e3a4
|
|
@ -24,7 +24,7 @@
|
||||||
"icon": "layui-icon layui-icon-console",
|
"icon": "layui-icon layui-icon-console",
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"openType": "_iframe",
|
"openType": "_iframe",
|
||||||
"href": "http://www.baidu.com"
|
"href": "http://www.bing.com"
|
||||||
}, {
|
}, {
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"title": "主题预览",
|
"title": "主题预览",
|
||||||
|
|
|
||||||
|
|
@ -110,23 +110,11 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
}
|
}
|
||||||
|
|
||||||
this.bodyRender = function(param) {
|
this.bodyRender = function(param) {
|
||||||
|
|
||||||
body.on("click", ".refresh", function() {
|
body.on("click", ".refresh", function() {
|
||||||
var refreshA = $(".refresh a");
|
refresh();
|
||||||
refreshA.removeClass("layui-icon-refresh-1");
|
|
||||||
refreshA.addClass("layui-anim");
|
|
||||||
refreshA.addClass("layui-anim-rotate");
|
|
||||||
refreshA.addClass("layui-anim-loop");
|
|
||||||
refreshA.addClass("layui-icon-loading");
|
|
||||||
if (param.tab.muiltTab) bodyTab.refresh(400);
|
|
||||||
else bodyFrame.refresh(400);
|
|
||||||
setTimeout(function() {
|
|
||||||
refreshA.addClass("layui-icon-refresh-1");
|
|
||||||
refreshA.removeClass("layui-anim");
|
|
||||||
refreshA.removeClass("layui-anim-rotate");
|
|
||||||
refreshA.removeClass("layui-anim-loop");
|
|
||||||
refreshA.removeClass("layui-icon-loading");
|
|
||||||
}, 600)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if (param.tab.muiltTab) {
|
if (param.tab.muiltTab) {
|
||||||
bodyTab = pearTab.render({
|
bodyTab = pearTab.render({
|
||||||
elem: 'content',
|
elem: 'content',
|
||||||
|
|
@ -155,6 +143,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bodyTab.click(function(id) {
|
bodyTab.click(function(id) {
|
||||||
if (!param.tab.keepState) {
|
if (!param.tab.keepState) {
|
||||||
bodyTab.refresh(false);
|
bodyTab.refresh(false);
|
||||||
|
|
@ -198,14 +187,6 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
}, param.other.keepLoad)
|
}, param.other.keepLoad)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.collaspe = function(param) {
|
|
||||||
if (param.menu.collaspe) {
|
|
||||||
if ($(window).width() >= 768) {
|
|
||||||
collaspe()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.themeRender = function(option) {
|
this.themeRender = function(option) {
|
||||||
if (option.theme.allowCustom === false) {
|
if (option.theme.allowCustom === false) {
|
||||||
$(".setting").remove();
|
$(".setting").remove();
|
||||||
|
|
@ -227,6 +208,19 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
this.menuSkin(menu);
|
this.menuSkin(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.collaspe = function(param) {
|
||||||
|
if (param.menu.collaspe) {
|
||||||
|
if ($(window).width() >= 768) {
|
||||||
|
collaspe()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题切换
|
||||||
|
*
|
||||||
|
* @param theme 目标主题
|
||||||
|
* */
|
||||||
this.menuSkin = function(theme) {
|
this.menuSkin = function(theme) {
|
||||||
var pearAdmin = $(".pear-admin");
|
var pearAdmin = $(".pear-admin");
|
||||||
pearAdmin.removeClass("light-theme");
|
pearAdmin.removeClass("light-theme");
|
||||||
|
|
@ -234,18 +228,34 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
pearAdmin.addClass(theme);
|
pearAdmin.addClass(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销事件
|
||||||
|
*
|
||||||
|
* @param callback 回调实现
|
||||||
|
* */
|
||||||
this.logout = function(callback) {
|
this.logout = function(callback) {
|
||||||
logout = callback;
|
logout = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息点击
|
||||||
|
*
|
||||||
|
* @param callback 回调实现
|
||||||
|
* */
|
||||||
this.message = function(callback) {
|
this.message = function(callback) {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
msgInstance.click(callback);
|
msgInstance.click(callback);
|
||||||
} else {
|
|
||||||
msgInstance.click(messageTip);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面切换
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @param title 标题
|
||||||
|
* @param url 路径
|
||||||
|
* @param load 动画
|
||||||
|
* */
|
||||||
this.jump = function(id, title, url) {
|
this.jump = function(id, title, url) {
|
||||||
if (config.tab.muiltTab) {
|
if (config.tab.muiltTab) {
|
||||||
bodyTab.addTabOnly({
|
bodyTab.addTabOnly({
|
||||||
|
|
@ -254,30 +264,40 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
url: url,
|
url: url,
|
||||||
icon: null,
|
icon: null,
|
||||||
close: true
|
close: true
|
||||||
}, 300);
|
}, 400);
|
||||||
} else {
|
} else {
|
||||||
sideMenu.selectItem(id);
|
sideMenu.selectItem(id);
|
||||||
bodyFrame.changePage(url, title, true);
|
bodyFrame.changePage(url, title, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面刷新
|
||||||
|
*
|
||||||
|
* @param null 无
|
||||||
|
* @param null 无
|
||||||
|
* */
|
||||||
|
this.refresh = function() {
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var messageTip = function(id, title, context, form) {
|
function refresh() {
|
||||||
layer.open({
|
var refreshA = $(".refresh a");
|
||||||
type: 1,
|
refreshA.removeClass("layui-icon-refresh-1");
|
||||||
title: '消息', //标题
|
refreshA.addClass("layui-anim");
|
||||||
area: ['390px', '330px'], //宽高
|
refreshA.addClass("layui-anim-rotate");
|
||||||
shade: 0.4, //遮罩透明度
|
refreshA.addClass("layui-anim-loop");
|
||||||
content: "<div style='background-color:whitesmoke;'><div class='layui-card'><div class='layui-card-body'>来源 : " +
|
refreshA.addClass("layui-icon-loading");
|
||||||
form + "</div><div class='layui-card-header' >标题 : " + title +
|
if (config.tab.muiltTab) bodyTab.refresh(400);
|
||||||
"</div><div class='layui-card-body' >内容 : " + context + "</div></div></div>", //支持获取DOM元素
|
else bodyFrame.refresh(400);
|
||||||
btn: ['确认'], //按钮组
|
setTimeout(function() {
|
||||||
scrollbar: false, //屏蔽浏览器滚动条
|
refreshA.addClass("layui-icon-refresh-1");
|
||||||
yes: function(index) { //layer.msg('yes'); //点击确定回调
|
refreshA.removeClass("layui-anim");
|
||||||
layer.close(index);
|
refreshA.removeClass("layui-anim-rotate");
|
||||||
showToast();
|
refreshA.removeClass("layui-anim-loop");
|
||||||
}
|
refreshA.removeClass("layui-icon-loading");
|
||||||
});
|
}, 600)
|
||||||
}
|
}
|
||||||
|
|
||||||
function collaspe() {
|
function collaspe() {
|
||||||
|
|
@ -297,11 +317,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
}
|
}
|
||||||
|
|
||||||
body.on("click", ".logout", function() {
|
body.on("click", ".logout", function() {
|
||||||
// 回调
|
if (logout()) {
|
||||||
var result = logout();
|
|
||||||
|
|
||||||
if (result) {
|
|
||||||
// 清空缓存
|
|
||||||
bodyTab.clear();
|
bodyTab.clear();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -464,7 +480,6 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
function buildLinkHtml() {
|
function buildLinkHtml() {
|
||||||
var links = "";
|
var links = "";
|
||||||
$.each(config.links, function(i, value) {
|
$.each(config.links, function(i, value) {
|
||||||
// value.target 存在,则为新窗口打开,增加 target="_blank" 属性
|
|
||||||
links += '<a class="more-menu-item" href="' + value.href + '" ' + (value.target ? ' target="_blank" ' : '') +
|
links += '<a class="more-menu-item" href="' + value.href + '" ' + (value.target ? ' target="_blank" ' : '') +
|
||||||
'>' +
|
'>' +
|
||||||
'<i class="' + value.icon + '" style="font-size: 19px;"></i> ' + value.title +
|
'<i class="' + value.icon + '" style="font-size: 19px;"></i> ' + value.title +
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ layui.define(['table', 'jquery', 'element'], function (exports) {
|
||||||
var loading = $("#"+elem).find(".pear-frame-loading");
|
var loading = $("#"+elem).find(".pear-frame-loading");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
loading.css({display:'none'});
|
loading.css({display:'none'});
|
||||||
},800)
|
},400)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ window.rootPath = (function(src) {
|
||||||
|
|
||||||
layui.config({
|
layui.config({
|
||||||
base: rootPath + "module/",
|
base: rootPath + "module/",
|
||||||
version: "3.8.9"
|
version: "3.8.10"
|
||||||
}).extend({
|
}).extend({
|
||||||
admin: "admin", // 框架布局组件
|
admin: "admin", // 框架布局组件
|
||||||
menu: "menu", // 数据菜单组件
|
menu: "menu", // 数据菜单组件
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
// 初始化消息回调
|
// 初始化消息回调
|
||||||
admin.message();
|
admin.message();
|
||||||
|
|
||||||
// 重写消息回调 [消息列表点击事件]
|
// 实现消息回调 [消息列表点击事件]
|
||||||
// admin.message(function(id, title, context, form) {});
|
// admin.message(function(id, title, context, form) {});
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,15 @@
|
||||||
<a target="_blank" href="https://gitee.com/pear-admin/Pear-Admin-Boot" class="pear-btn pear-btn-danger layui-btn-fluid" style="margin-top: 8px;height: 50px;line-height: 50px;">后 端</a>
|
<a target="_blank" href="https://gitee.com/pear-admin/Pear-Admin-Boot" class="pear-btn pear-btn-danger layui-btn-fluid" style="margin-top: 8px;height: 50px;line-height: 50px;">后 端</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
寄语
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="line-height:40px;">
|
||||||
|
原想将澎湃的爱平平稳稳放置你手心,奈何我徒有一股蛮劲,只顾向你跑去,一个不稳跌的满身脏兮兮。试图爬起的我,
|
||||||
|
心想你会不会笑我 "献爱献的这样笨拙, 怎么不知避开爱里的埋伏"
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -183,11 +183,6 @@
|
||||||
<span>4月30日 22:43</span>
|
<span>4月30日 22:43</span>
|
||||||
<a href="javascript:;" data-id="1" class="pear-btn pear-btn-primary pear-btn-xs pear-reply">回复</a>
|
<a href="javascript:;" data-id="1" class="pear-btn pear-btn-primary pear-btn-xs pear-reply">回复</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<p>我一向憎恶为自己的温饱打算的人。人是高于温饱的。</p>
|
|
||||||
<span>5月12日 01:25</span>
|
|
||||||
<a href="javascript:;" data-id="1" class="pear-btn pear-btn-primary pear-btn-xs pear-reply">回复</a>
|
|
||||||
</li>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>接近,是我对一切的态度,是我对一切态度的距离</p>
|
<p>接近,是我对一切的态度,是我对一切态度的距离</p>
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
$("[to]").click(function(){
|
$("[to]").click(function(){
|
||||||
top.layui.admin.jump(14,"百度一下","http://www.baidu.com",true)
|
top.layui.admin.jump(14,"百度一下","http://www.bing.com",true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,7 @@
|
||||||
page: true,
|
page: true,
|
||||||
cols: cols,
|
cols: cols,
|
||||||
skin: 'line',
|
skin: 'line',
|
||||||
|
size: 'sm',
|
||||||
toolbar: '#user-toolbar',
|
toolbar: '#user-toolbar',
|
||||||
defaultToolbar: [{
|
defaultToolbar: [{
|
||||||
title: '刷新',
|
title: '刷新',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue