首先先上代码
Alert.Show(JsonConvert.SerializeObject(deptsList.ToArray()));
输出
- [{"Selected":false,"Text":"--根节点--","Display":"","Group":"","Value":"-1","EnableSelect":true,"SimulateTreeLevel":0},{"Selected":false,"Text":"人管中心","Display":"","Group":"","Value":"1","EnableSelect":true,"SimulateTreeLevel":1},{"Selected":false,"Text":"行政部","Display":"","Group":"","Value":"2","EnableSelect":true,"SimulateTreeLevel":2},{"Selected":false,"Text":"财务部","Display":"","Group":"","Value":"8","EnableSelect":true,"SimulateTreeLevel":1},{"Selected":false,"Text":"信息部","Display":"","Group":"","Value":"9","EnableSelect":true,"SimulateTreeLevel":2},{"Selected":false,"Text":"资金部","Display":"","Group":"","Value":"10","EnableSelect":true,"SimulateTreeLevel":2}]
复制代码
UIHelper.DropDownList("DeptsID").LoadData(deptsList.ToArray());
控制台显示
- F.ui.DeptsID.loadData([["-1","--根节点--",1,"",""],["1","人管中心",1,"",""],["2","行政部",1,"",""],["8","财务部",1,"",""],["9","信息部",1,"",""],["10","资金部",1,"",""]]);F.ui.DeptsID.setValue('-1');
复制代码 为什么 loadData 的时候没有 EnableSelect 和 SimulateTreeLevel 的属性
|