基础版

develop
Jmysy 2020-06-24 21:18:33 +08:00
parent d425d4d115
commit 3ec5a5a399
126 changed files with 25508 additions and 4 deletions

View File

@ -21,8 +21,6 @@
background-color: #5FB878;
}
.pear-nav-tree .toast{
font-size: 14px;
margin: 5px;

View File

@ -95,8 +95,6 @@
pearSocial.render(setting);
pearAdmin.render(config);
})
</script>
<!-- 新 增 百 度 统 计 ( 可 移 除 )-->

View File

@ -0,0 +1,106 @@
/** 基 础 布 局 */
.pear-admin .layui-header,
.pear-admin .layui-body,
.pear-admin .pear-logo,
.pear-admin .layui-side,
.pear-admin .layui-footer {
transition: all .3s;
}
.pear-logo {
width: 220px;
height: 60px;
line-height: 60px;
text-align: center;
color: #5FB878;
background-color: #28333E;
font-size: 17px;
font-weight: 600;
}
.layui-header {
left: 220px;
background-color: white !important;
padding: 0px;
width: calc(100% - 220px);
}
.layui-header * {
color: black !important;
}
.pear-logo img{
display: none;
}
.layui-layout-admin .layui-side {
top: 0px;
width: 220px;
box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
z-index: 9999;
}
.layui-side::-webkit-scrollbar {
width: 0px;
height: 0px;
}
.layui-body {
left: 220px;
}
.layui-footer {
left: 220px;
}
/** 顶 部 样 式 */
.layui-header .layui-nav .layui-nav-bar {
top: 0px !important;
height: 2px !important;
background-color: #5FB878;
}
.layui-header .layui-nav .layui-this:after {
display: none;
}
/** 隐 藏 布 局 样 式 */
.pear-mini .layui-side {
width: 60px;
}
.pear-mini .layui-header {
left: 60px;
width: calc(100% - 60px);
}
.pear-mini .layui-body {
left: 60px;
}
.pear-mini .pear-logo {
width: 60px;
}
.pear-mini .layui-nav-tree .layui-nav-item span {
display: none;
}
.pear-mini .bottom-nav li {
width: 100% !important;
}
.pear-mini .layui-side-scroll {
height: calc(100% - 60px);
}
.pear-mini .layui-footer {
left: 60px;
}
.pear-mini .pear-logo span{
display: none!important;
}
.pear-mini .pear-logo img{
display: inline-block!important;
}
/** 主 题 样 式 */
/** 向 右 打 开 */

View File

@ -0,0 +1,314 @@
[{
"id": 1,
"title": "工作空间",
"type": 0,
"icon": "layui-icon layui-icon-console",
"href": "",
"children": [{
"id": 0,
"title": "控制后台",
"icon": "layui-icon layui-icon-console",
"type": 1,
"openType": "_iframe",
"href": "view/console/console1.html"
}, {
"id": 13,
"title": "数据分析",
"icon": "layui-icon layui-icon-console",
"type": 1,
"openType": "_iframe",
"href": "view/console/console2.html"
}, {
"id": 12,
"title": "百度一下",
"icon": "layui-icon layui-icon-console",
"type": 1,
"openType": "_iframe",
"href": "http://www.baidu.com"
}]
},
{
"id": 4,
"title": "系统管理",
"icon": "layui-icon layui-icon-set-fill",
"type": 0,
"href": "",
"children": [{
"id": 44,
"title": "部门管理",
"icon": "layui-icon layui-icon-username",
"type": 1,
"openType": "_iframe",
"href": "view/system/organization.html"
},{
"id": 41,
"title": "用户管理",
"icon": "layui-icon layui-icon-username",
"type": 1,
"openType": "_iframe",
"href": "view/system/user.html"
},
{
"id": 42,
"title": "角色管理",
"icon": "layui-icon layui-icon-user",
"type": 1,
"openType": "_iframe",
"href": "view/system/role.html"
},
{
"id": 43,
"title": "权限管理",
"icon": "layui-icon layui-icon-user",
"type": 1,
"openType": "_iframe",
"href": "view/system/power.html"
}
]
},
{
"id": 2,
"title": "扩展组件",
"icon": "layui-icon layui-icon-component",
"type": 0,
"href": "",
"children": [
{
"id": 21,
"title": "常用组件",
"icon": "layui-icon layui-icon-face-smile",
"type": 0,
"href": "view/common/message.html",
"children": [{
"id": 216,
"title": "权限认证",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/auth.html"
}, {
"id": 211,
"title": "功能按钮",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/button.html"
},
{
"id": 200,
"title": "字体图标",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/icon.html"
},
{
"id": 212,
"title": "表单集合",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/form.html"
},
{
"id": 215,
"title": "分步表单",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/step.html"
},
{
"id": 213,
"title": "多选下拉",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/formSelects.html"
},
{
"id": 217,
"title": "弹出窗体",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/basic/layer.html"
}
]
},
{
"id": 22,
"title": "进阶组件",
"icon": "layui-icon layui-icon-face-smile",
"type": 0,
"href": "view/common/message.html",
"children": [{
"id": 221,
"title": "数据表格",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/senior/table.html"
},
{
"id": 225,
"title": "卡片列表",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/senior/card.html"
},
{
"id": 222,
"title": "树型表格",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/senior/treeTable.html"
},
{
"id": 224,
"title": "树状结构",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/senior/dtree.html"
},
{
"id": 223,
"title": "文本编辑",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/senior/tinymce.html"
}
]
},
{
"id": 23,
"title": "弹层组件",
"icon": "layui-icon layui-icon-face-smile",
"type": 0,
"href": "view/common/message.html",
"children": [{
"id": 231,
"title": "消息提醒",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/popper/message.html"
},
{
"id": 232,
"title": "加载组件",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/popper/loading.html"
},
{
"id": 233,
"title": "抽屉组件",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/common/popper/drawer.html"
}
]
},
{
"id": 24,
"title": "其他扩展",
"icon": "layui-icon layui-icon-face-smile",
"type": 0,
"href": "view/common/table.html",
"children": [{
"id": 241,
"title": "哈希加密",
"icon": "layui-icon layui-icon-face-cry",
"type": 1,
"openType": "_iframe",
"href": "view/common/other/hash.html"
},
{
"id": 242,
"title": "省市级联",
"icon": "layui-icon layui-icon-face-cry",
"type": 1,
"openType": "_iframe",
"href": "view/common/other/area.html"
}
]
}
]
},
{
"id": 3,
"title": "常用页面",
"icon": "layui-icon layui-icon-face-cry",
"type": 0,
"href": "",
"children": [{
"id": 301,
"title": "任务列表",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/page/task.html"
},
{
"id": 302,
"title": "登录页面",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "login.html"
},
{
"id": 303,
"title": "留言板",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/page/comment.html"
}
]
},
{
"id": "error",
"title": "错误页面",
"icon": "layui-icon layui-icon-auz",
"type": 0,
"href": "",
"children": [{
"id": 403,
"title": "403",
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_iframe",
"href": "view/error/403.html"
},
{
"id": 404,
"title": "404",
"icon": "layui-icon layui-icon-face-cry",
"type": 1,
"openType": "_iframe",
"href": "view/error/404.html"
},
{
"id": 500,
"title": "500",
"icon": "layui-icon layui-icon-face-cry",
"type": 1,
"openType": "_iframe",
"href": "view/error/500.html"
}
]
}
]

View File

@ -0,0 +1,88 @@
[{
"id": 1,
"title": "私信",
"children": [{
"id": 11,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}, {
"id": 12,
"avatar":"admin/images/success.png",
"title": "收到一条成功通知",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}]
},
{
"id": 2,
"title": "消息",
"children": [{
"id": 11,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}, {
"id": 12,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
},
{
"id": 11,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}, {
"id": 12,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
},
{
"id": 11,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}, {
"id": 12,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}]
},
{
"id": 3,
"title": "通知",
"children": [{
"id": 11,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}, {
"id": 12,
"avatar":"admin/images/success.png",
"title": "收到一条紧急任务",
"context": "这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容,这是消息内容",
"form": "就眠仪式",
"time": "2019-02-15"
}]
}
]

155
基础版/admin/js/index.js Normal file
View File

@ -0,0 +1,155 @@
layui.use(['element', 'menu', 'tab', 'jquery', 'frame', 'message'], function() {
var element = layui.element;
var menu = layui.menu;
var tab = layui.tab;
var $ = layui.jquery;
var frame = layui.frame;
var message = layui.message;
/** 公 用 组 件 对 象 */
var sideMenu,content;
render();
function render() {
menuRender(); /** 初 始 化 菜 单 */
tabRender(); /** 初 始 化 选 项 卡 */
logoRender(); /** 图 标 初 始 化 */
noticeRender(); /** 消 息 栏 初 始 化 */
}
/** 初 始 化 侧 边 菜 单 */
function menuRender() {
sideMenu = menu.render({
elem: 'sideMenu',
async: true,
theme: "dark",
height: '100%',
control: false,
accordion: true,
url: "admin/data/menu.json",
parseData: false,
done: function() {
console.log(" 菜 单 渲 染 完 成 ");
}
})
// 初 始 化 选 中
sideMenu.selectItem("0");
}
/** 选 项 卡 初 始 化 */
function tabRender() {
content = tab.render({
elem: 'content',
roll: true,
tool: true,
width: '100%',
height: '100%',
index: 0,
tabMax: 20,
data: [{
id: '0',
url: "view/console/console.html",
title: '首页',
close: false,
}]
});
content.click(function(){
// 选 项 卡 定 位
content.positionTab();
// 菜 单 选 中
sideMenu.selectItem(id);
})
sideMenu.click(function(dom, data){
content.addTabOnly({
id: data.menuId,
title: data.menuTitle,
url: data.menuUrl,
icon: data.menuIcon,
close: true
}, 300);
content.positionTab();
})
}
/** Iframe 初 始 化 */
function frameRender() {
content = frame.render({
elem: 'content',
title: '工作空间 / 首页',
url: "https://www.baidu.com",
width: '100%',
height: '100%'
});
sideMenu.click(function(dom, data){
content.changePage(data.menuUrl, data.menuPath, true);
})
}
function noticeRender(){
message.render({
elem: 'message',
url: "admin/data/message.json",
height: '250px',
click: function(id, title, context, form) {
layer.msg("message:"+id);
}
});
}
/** Logo 初 始 化 */
function logoRender(){
$(".pear-logo span").html("Pear Admin");
$(".pear-logo img").attr("src","Pear Admin");
}
$(".refresh").click(function(){
content.refresh(500);
})
// 菜 单 的 隐 藏 触 发
$(".collaspe").click(function() {
sideMenu.collaspe();
if ($(".pear-admin").is(".pear-mini")) {
$(".pear-admin").removeClass("pear-mini");
} else {
$(".pear-admin").addClass("pear-mini");
}
})
setTimeout(function() {
$(".loader-main").fadeOut();
}, 2000)
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});

View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/** layui-v2.5.6 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More