$('#data-datagrid').treegrid({
url:'../admin/menu/list',
rownumbers:true,
singleSelect:true,
pageSize:20,
pagination:true,//是否分页
multiSort:true,
fitColumns:true,
idField:'id',
treeField:'name',
fit:true,
columns:[[
{ field:'name',title:'菜单名称',width:100,sortable:true},
{ field:'url',title:'菜单URL',width:100,sortable:true},
{ field:'icon',title:'图标icon',width:100,formatter:function(value,index,row){
var test='<a class="' + value +'"> </a>'
return test + value;//预览图标
}},
]]
});
预览图标功能的实现
最新推荐文章于 2021-06-05 12:14:05 发布