{"action":"created","issue":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1162","labels_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1162/labels{/name}","comments_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1162/comments","events_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1162/events","html_url":"https://github.com/RubyLouvre/avalon/issues/1162","id":117076580,"number":1162,"title":"oni UI      tree组件的bug！！！","user":{"login":"z893495246","id":14210139,"avatar_url":"https://avatars.githubusercontent.com/u/14210139?v=3","gravatar_id":"","url":"https://api.github.com/users/z893495246","html_url":"https://github.com/z893495246","followers_url":"https://api.github.com/users/z893495246/followers","following_url":"https://api.github.com/users/z893495246/following{/other_user}","gists_url":"https://api.github.com/users/z893495246/gists{/gist_id}","starred_url":"https://api.github.com/users/z893495246/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z893495246/subscriptions","organizations_url":"https://api.github.com/users/z893495246/orgs","repos_url":"https://api.github.com/users/z893495246/repos","events_url":"https://api.github.com/users/z893495246/events{/privacy}","received_events_url":"https://api.github.com/users/z893495246/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-16T08:46:17Z","updated_at":"2015-11-16T09:36:06Z","closed_at":null,"body":"tree组件的父子关系data配置好像没起到作用，它的上下级关系并不是根据父子关系排列的，而是根据数据的顺序排列\r\n-----------------------------这是tree组件的数据源【简单数据模式】----------------------\r\nvar zNodes =[\r\n            { id:1, pid:0, name:\"父节点1 - 展开\", open:true},\r\n            { id:11, pid:1, name:\"父节点11 - 折叠\"},\r\n            { id:111, pid:11, name:\"叶子节点111\"},\r\n            { id:112, pid:11, name:\"叶子节点112\"},\r\n            { id:113, pid:11, name:\"叶子节点113\"},\r\n            { id:114, pid:11, name:\"叶子节点114\"},\r\n            { id:12, pid:1, name:\"父节点12 - 折叠\"},\r\n            { id:121, pid:12, name:\"叶子节点121\"},\r\n            { id:122, pid:12, name:\"叶子节点122\"},\r\n            { id:123, pid:12, name:\"叶子节点123\"},\r\n            { id:124, pid:12, name:\"叶子节点124\"},\r\n            { id:13, pid:1, name:\"父节点13 - 没有子节点\", isParent:true},\r\n            { id:2, pid:0, name:\"父节点2 - 折叠\"},\r\n            { id:21, pid:2, name:\"父节点21 - 展开\", open:true},\r\n            { id:211, pid:21, name:\"叶子节点211\"},\r\n            { id:212, pid:21, name:\"叶子节点212\"},\r\n            { id:213, pid:21, name:\"叶子节点213\"},\r\n            { id:214, pid:21, name:\"叶子节点214\"},\r\n            { id:22, pid:2, name:\"父节点22 - 折叠\"},\r\n            { id:221, pid:22, name:\"叶子节点221\"},\r\n            { id:222, pid:22, name:\"叶子节点222\"},\r\n            { id:223, pid:22, name:\"叶子节点223\"},\r\n            { id:224, pid:22, name:\"叶子节点224\"},\r\n            { id:23, pid:2, name:\"父节点23 - 折叠\"},\r\n            { id:231, pid:23, name:\"叶子节点231\"},\r\n            { id:232, pid:23, name:\"叶子节点232\"},\r\n            { id:233, pid:23, name:\"叶子节点233\"},\r\n            { id:234, pid:23, name:\"叶子节点234\"},\r\n            { id:3, pid:0, name:\"父节点3 - 没有子节点\", isParent:true}\r\n        ];\r\n------------------------------------------------------------------------------\r\n大家可以尝试一下，把数据的顺序给打乱，看下效果，你就会发现，data的配置没有起到丝毫作用！"},"comment":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/comments/156970114","html_url":"https://github.com/RubyLouvre/avalon/issues/1162#issuecomment-156970114","issue_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1162","id":156970114,"user":{"login":"z893495246","id":14210139,"avatar_url":"https://avatars.githubusercontent.com/u/14210139?v=3","gravatar_id":"","url":"https://api.github.com/users/z893495246","html_url":"https://github.com/z893495246","followers_url":"https://api.github.com/users/z893495246/followers","following_url":"https://api.github.com/users/z893495246/following{/other_user}","gists_url":"https://api.github.com/users/z893495246/gists{/gist_id}","starred_url":"https://api.github.com/users/z893495246/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z893495246/subscriptions","organizations_url":"https://api.github.com/users/z893495246/orgs","repos_url":"https://api.github.com/users/z893495246/repos","events_url":"https://api.github.com/users/z893495246/events{/privacy}","received_events_url":"https://api.github.com/users/z893495246/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T09:36:05Z","updated_at":"2015-11-16T09:36:05Z","body":"@gogoyqj 把数据源打乱，你就会发现奇迹。"}}