document.querySelector('[grid-manager="lmExOne"]').GM('init', {
supportRemind: true
,supportAjaxPage:true
,supportSorting: true
,ajaxData: 'http://www.lovejavascript.com/learnLinkManager/getLearnLinkList'
,disableCache: false
,ajaxType: 'POST'
,query: {pluginId: 1}
,pageSize:20
,columnData: [{
key: 'name',
remind: 'the name',
width: '100px',
text: '名称',
sorting: 'up'
},{
key: 'info',
remind: 'the info',
text: '使用说明',
sorting: ''
},{
key: 'url',
remind: 'the url',
text: 'url'
},{
key: 'createDate',
remind: 'the createDate',
width: '100px',
text: '创建时间',
template: function(createDate, rowObject){
return new Date(createDate);
}
},{
key: 'lastDate',
remind: 'the lastDate',
width: '100px',
text: '最后修改时间',
template: function(lastDate, rowObject){
return new Date(lastDate);
}
},{
key: 'action',
remind: 'the action',
width: '100px',
text: '操作',
template: function(action, rowObject){
return '编辑'
+'删除';
}
}
]
,pagingBefore: function(query){
console.log('pagingBefore', query);
}
,pagingAfter: function(data){
console.log('pagingAfter', data);
}
});