提交 947b1e59 编写于 作者: doc_wei's avatar doc_wei

添加树表格

上级 9cef69a0
.layui-tree-head{
cursor: pointer;
}
\ No newline at end of file
/**
@Name:treeGrid树状表格
@Author:lrd
*/
layui.config({
base: basePath
}).extend({
dltable: '../layui/lay/modules/treetable/dltable'
}).define(['laytpl', 'laypage','dltable', 'layer', 'form'], function(exports){
"use strict";
var $ = layui.jquery;
var layer = layui.layer;
var dltable = layui.dltable;
var treeGrid = $.extend({},dltable);
treeGrid._render = treeGrid.render;
treeGrid.render = function(param){//重写渲染方法
param.isTree = true;//是树表格
treeGrid._render(param);
};
exports('treeGrid', treeGrid);
});
\ No newline at end of file
...@@ -122,7 +122,8 @@ function isNull(str){ ...@@ -122,7 +122,8 @@ function isNull(str){
vue: 'modules/codemirror/vue',//代码格式编辑器vue支持vue vue: 'modules/codemirror/vue',//代码格式编辑器vue支持vue
zclip: 'modules/jquery.zclip',//复制插件 zclip: 'modules/jquery.zclip',//复制插件
swiper: 'modules/swiper/swiper.min',//滚动插件 swiper: 'modules/swiper/swiper.min',//滚动插件
tableSelect: 'modules/tableSelect.js',//tableSelect 下拉表格选择器 tableSelect: 'modules/tableSelect',//tableSelect 下拉表格选择器
treeGrid: 'modules/treetable/treeGrid',//树表格
}; };
// 记录基础数据 // 记录基础数据
......
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['treeGrid', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
treeGrid = layui.treeGrid;
//搜索表单
form.render();
form.on('submit(formSearch)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
function loadTable(){
}
exports('tarea', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="width:700px;margin:0 auto;padding-top:20px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">角色名称</label>
<div class="layui-input-inline">
<input type="text" id="roleName" name="roleName" placeholder="请输入角色名称" class="layui-input" />
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block" style="margin:0;">
<button class="layui-btn" lay-submit lay-filter="formSearch">搜索</button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i>刷新数据</button>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/tarea/'}).use('tarea');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册