{"action":"created","issue":{"url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/713","labels_url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/713/comments","events_url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/713/events","html_url":"https://github.com/RubyLouvre/avalon.oniui/issues/713","id":101454837,"number":713,"title":"smartgrid渲染空值问题","user":{"login":"lkiarest","id":2672975,"avatar_url":"https://avatars.githubusercontent.com/u/2672975?v=3","gravatar_id":"","url":"https://api.github.com/users/lkiarest","html_url":"https://github.com/lkiarest","followers_url":"https://api.github.com/users/lkiarest/followers","following_url":"https://api.github.com/users/lkiarest/following{/other_user}","gists_url":"https://api.github.com/users/lkiarest/gists{/gist_id}","starred_url":"https://api.github.com/users/lkiarest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkiarest/subscriptions","organizations_url":"https://api.github.com/users/lkiarest/orgs","repos_url":"https://api.github.com/users/lkiarest/repos","events_url":"https://api.github.com/users/lkiarest/events{/privacy}","received_events_url":"https://api.github.com/users/lkiarest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-17T16:01:07Z","updated_at":"2015-08-18T03:01:46Z","closed_at":null,"body":"使用smartgrid的示例页面avalon.smartgrid.ex1.html，如果将data数组中name的值设为null对象，在页面上渲染之后显示的是字符串\"null\"，后面如果从data里取值取到的也是字符串\"null\"。\r\n调试的时候可以看到拼html的时候是直接用 \"+\" 将format之后的cellValue 加到html字符串的，没有判断是否为null，应该是这个原因导致的。"},"comment":{"url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/comments/132049849","html_url":"https://github.com/RubyLouvre/avalon.oniui/issues/713#issuecomment-132049849","issue_url":"https://api.github.com/repos/RubyLouvre/avalon.oniui/issues/713","id":132049849,"user":{"login":"roscoe054","id":4938243,"avatar_url":"https://avatars.githubusercontent.com/u/4938243?v=3","gravatar_id":"","url":"https://api.github.com/users/roscoe054","html_url":"https://github.com/roscoe054","followers_url":"https://api.github.com/users/roscoe054/followers","following_url":"https://api.github.com/users/roscoe054/following{/other_user}","gists_url":"https://api.github.com/users/roscoe054/gists{/gist_id}","starred_url":"https://api.github.com/users/roscoe054/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roscoe054/subscriptions","organizations_url":"https://api.github.com/users/roscoe054/orgs","repos_url":"https://api.github.com/users/roscoe054/repos","events_url":"https://api.github.com/users/roscoe054/events{/privacy}","received_events_url":"https://api.github.com/users/roscoe054/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T03:01:46Z","updated_at":"2015-08-18T03:01:46Z","body":"我这里从data里取出来的不是字符串的，可以看看你这块的代码吗？\r\n```javascript\r\nfunction getDatas(number) {\r\n    var data = []\r\n    for (var i = 0; i < number; i++) {\r\n        data.push({\r\n            name: null,\r\n            age: parseInt(10 + Math.random() * 20),\r\n            selected: i%3 ? false: true,\r\n            salary: parseInt(Math.random() * 100),\r\n            operate : i % 5 ? 0 : 1,\r\n            busy : !i%3 && !i%5 ? 0 : 1\r\n        })\r\n    }\r\n    return data\r\n} \r\n```\r\n![image](https://cloud.githubusercontent.com/assets/4938243/9321402/76e38236-4598-11e5-8198-29733eb5f6ca.png)\r\n"}}