测试ztree菜单
- ztree 是一个依靠 jQuery 实现的多功能 “树插件”,需要导入jquery才能导入zTree
- 树状菜单、树状数据的Web显示、权限管理等功能会使用到
- 特点
优异的性能、灵活的配置、多种功能的组合
ztree菜单测试
引入js
编写test
生成的数据的类型为List<Map<String,Object>>
public class TestZtreeJsonData {
@Test
public void test01() throws JsonProcessingException {
List<Map<String,Object>> list=new ArrayList<>();
Map<String,Object> node1=new HashMap<String,Object>();
node1.put("id",1);
node1.put("pId",0);
node1.put("name","Sass管理");
node1.put("open",true);
Map<String,Object> node2=new HashMap<String,Object>();
node2.put("id",11);
node2.put("pId",1);
node2.put("name","企业管理");
node2.