修改菜单及部门排序规则
This commit is contained in:
@ -233,13 +233,13 @@
|
||||
}
|
||||
// 缓存并格式化数据
|
||||
var formatData = function(data) {
|
||||
var _root = options.rootIdValue ? options.rootIdValue : null
|
||||
var _root = options.rootIdValue ? options.rootIdValue : null;
|
||||
var firstCode = data[0][options.parentCode];
|
||||
$.each(data, function(index, item) {
|
||||
// 添加一个默认属性,用来判断当前节点有没有被显示
|
||||
item.isShow = false;
|
||||
// 这里兼容几种常见Root节点写法
|
||||
// 默认的几种判断
|
||||
var firstCode = (0 == index ? item[options.parentCode] : '-');
|
||||
var _defaultRootFlag = item[options.parentCode] == '0' ||
|
||||
item[options.parentCode] == 0 ||
|
||||
item[options.parentCode] == null ||
|
||||
|
Reference in New Issue
Block a user