表格插件, 表格展示json数据

插件特效
2026-07-26 03:14 4 次浏览 • 0 次下载 113.3KB
表格插件, 表格展示json数据

列名 以及该列对应的json值

1
2
3
4
5
6
7
8
9
10
11
var cols = [
{ title:'ID', name:'id' ,width:100, align:'center' },
{ title:'用户ID', name:'user_id' ,width:100, align:'center' },
{ title:'APPID', name:'app_id' ,width:100, align:'center'},
{ title:'来自哪个游戏', name:'from_app_id' ,width:100, align:'center'},
{ title:'奖励状态', name:'status' ,width:100, align:'center'},
{ title:'时间', name:'dt' ,width:200, align:'center'},
{ title:'操作', name:'' ,width:150, align:'center', lockWidth:true, lockDisplay: true, renderer: function(){
return '<button class="btn btn-info">查看</button> <button class="btn btn-danger">删除</button>'}
}
];

AJAX请求

1
2
3
4
5
6
7
8
9
10
11
12
var mmg = $('#active-info').mmGrid({
cols: cols,
url: 'adwall/activeList',
params: {"appid":null,"status":null,"from_app_id":null},
width: 'auto',
height: '500px',
sortName: 'id',// 更具ID排序
method: 'get', // 请求方式
multiSelect: true,// 多选
checkCol: true, // 选框列
indexCol: true // 索引列
});


星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

关于我们

隐私政策

侵权投诉

站长:IT小君

粤ICP备20043561号

2016-2046 © 星河码客

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare