提交一些代码
This commit is contained in:
parent
7cb6c175d8
commit
c756eb4211
|
@ -7,7 +7,8 @@
|
|||
<!-- 说明提示框 -->
|
||||
<div class="layui-col-lg12">
|
||||
<div class="setting-msg">
|
||||
<p>1. 注意:当分类下存在链接时,此分类不允许删除,如果需要删除分类请先前往【<a href = "/index.php?c=admin&page=link_list">我的链接</a>】删除此分类下的所有链接后再操作!</p>
|
||||
<p>1. 注意:当分类下存在链接时,此分类不允许删除,如果需要删除分类请先前往【<a
|
||||
href="/index.php?c=admin&page=link_list">我的链接</a>】删除此分类下的所有链接后再操作!</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 说明提示框END -->
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Layui</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="stylesheet" href="../../static/layui-2.6.8/css/layui.css" media="all">
|
||||
<!-- 注意:如果你直接复制所有代码到本地,上述css路径需要改成你本地的 -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-body">
|
||||
<!-- 说明提示框 -->
|
||||
<div class="layui-col-lg12">
|
||||
<div class="setting-msg">
|
||||
<p>1. 注意:当分类下存在链接时,此分类不允许删除,如果需要删除分类请先前往【<a
|
||||
href="/index.php?c=admin&page=link_list">我的链接</a>】删除此分类下的所有链接后再操作!</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 说明提示框END -->
|
||||
<div class="layui-col-lg12">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-lg2">
|
||||
<div id="test1" class="demo-tree demo-tree-box"></div>
|
||||
</div>
|
||||
<div class="layui-col-lg10">
|
||||
<table id="category_list" lay-filter="mycategory"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="nav_operate">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" onclick = "">删除</a>
|
||||
</script>
|
||||
|
||||
<!-- 表头工具栏 -->
|
||||
<script type="text/html" id="catToolbar">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="setPrivate">设为私有</button>
|
||||
<button class="layui-btn layui-btn-sm" lay-event="setPublic">设为公开</button>
|
||||
</div>
|
||||
</script>
|
||||
<!-- 表头工具栏END -->
|
||||
</div>
|
||||
|
||||
<script src="../../static/layui-2.6.8/layui.js" charset="utf-8"></script>
|
||||
<!-- 注意:如果你直接复制所有代码到本地,上述 JS 路径需要改成你本地的 -->
|
||||
|
||||
<script>
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
|
||||
table.render({
|
||||
elem: '#category_list'
|
||||
, toolbar: '#catToolbar' //开启头部工具栏,并为其绑定左侧模板
|
||||
, url: 'http://layui.apixx.net/demo/table/user/data.js'
|
||||
, cols: [[
|
||||
{ field: 'id', width: 80, title: 'ID', sort: true }
|
||||
, { field: 'username', width: 80, title: '用户名' }
|
||||
, { field: 'sex', width: 80, title: '性别', sort: true }
|
||||
, { field: 'city', width: 80, title: '城市' }
|
||||
, { field: 'sign', title: '签名', minWidth: 150 }
|
||||
, { field: 'experience', width: 80, title: '积分', sort: true }
|
||||
, { field: 'score', width: 80, title: '评分', sort: true }
|
||||
, { field: 'classify', width: 80, title: '职业' }
|
||||
, { field: 'wealth', width: 135, title: '财富', sort: true }
|
||||
, { fixed: 'right', width: 178, align: 'center', toolbar: '#nav_operate' }
|
||||
]]
|
||||
, page: true
|
||||
});
|
||||
});
|
||||
layui.use(['tree', 'util'], function () {
|
||||
var tree = layui.tree
|
||||
, layer = layui.layer
|
||||
, util = layui.util
|
||||
, data1 = [{
|
||||
title: '江西'
|
||||
, id: 1
|
||||
, children: [{
|
||||
title: '南昌'
|
||||
, id: 1000
|
||||
, children: [{
|
||||
title: '青山湖区'
|
||||
, id: 10001
|
||||
}, {
|
||||
title: '高新区'
|
||||
, id: 10002
|
||||
}]
|
||||
}, {
|
||||
title: '九江'
|
||||
, id: 1001
|
||||
}, {
|
||||
title: '赣州'
|
||||
, id: 1002
|
||||
}]
|
||||
}, {
|
||||
title: '广西'
|
||||
, id: 2
|
||||
, children: [{
|
||||
title: '南宁'
|
||||
, id: 2000
|
||||
}, {
|
||||
title: '桂林'
|
||||
, id: 2001
|
||||
}]
|
||||
}, {
|
||||
title: '陕西'
|
||||
, id: 3
|
||||
, children: [{
|
||||
title: '西安'
|
||||
, id: 3000
|
||||
}, {
|
||||
title: '延安'
|
||||
, id: 3001
|
||||
}]
|
||||
}];
|
||||
//常规用法
|
||||
tree.render({
|
||||
elem: '#test1' //默认是点击节点可进行收缩
|
||||
, data: data1
|
||||
, onlyIconControl: true
|
||||
, isJump: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
Loading…
Reference in New Issue