diff --git a/user.html b/user.html
index 8da46de..628d65a 100644
--- a/user.html
+++ b/user.html
@@ -25,10 +25,10 @@
@@ -47,10 +47,10 @@
-
共有数据:8888 条
+
共有数据: 条
-
+
@@ -73,7 +73,7 @@
});
table.render({
- elem: '#userTable',
+ elem: '#tableId',
url:'data/data.json',
limit: 10,
page: true,
@@ -88,15 +88,42 @@
{field:'email', title:'邮箱', width:200},
{field:'createTime', title:'创建时间', width:200},
{field:'logins', title:'登陆次数', width:100},
- {field:'sex', title:'操作', width:280, templet: '#operationTpl', align:'center'}
- ]]
+ {title:'操作', width:280, templet: '#operationTpl', align:'center'}
+ ]],
+ done: function(res, curr, count){
+ $("#countNum").text(count);
+ }
});
form.on('submit(search)', function () {
- alert(666);
+ layer.msg('正在查询,请稍后...');
return false;
});
+ table.on('tool(tableFilter)', function(obj){
+ var data = obj.data;
+ var layEvent = obj.event;
+ if(layEvent === 'edit'){
+ layer.open({
+ title: '编辑用户',
+ type: 2,
+ shade: false,
+ maxmin: true,
+ shade: 0.5,
+ area: ['90%', '90%'],
+ content: 'user-edit.html',
+ zIndex: layer.zIndex,
+ end: function () {
+ // $(".layui-laypage-btn")[0].click();
+ }
+ });
+ }else if(layEvent === 'del'){
+ layer.confirm("确定要删除吗?", {skin: 'layui-layer-lan', icon: 2, title:'提示', anim: 4}, function () {
+ layer.msg("操作成功!", {icon: 1, time: 1000});
+ });
+ }
+ });
+
$("#batchEnabled").click(function(){
layer.confirm("确定要批量启用吗?", {icon: 3, title:'提示'}, function () {
layer.msg("操作成功!", {icon: 1, time: 1000});