{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/weex/issues/1327","repository_url":"https://api.github.com/repos/alibaba/weex","labels_url":"https://api.github.com/repos/alibaba/weex/issues/1327/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/weex/issues/1327/comments","events_url":"https://api.github.com/repos/alibaba/weex/issues/1327/events","html_url":"https://github.com/alibaba/weex/issues/1327","id":179709245,"number":1327,"title":"repeat{{list}}语法，无法获取以下划线开头变量的值","user":{"login":"00SunnyDay00","id":6287040,"avatar_url":"https://avatars.githubusercontent.com/u/6287040?v=3","gravatar_id":"","url":"https://api.github.com/users/00SunnyDay00","html_url":"https://github.com/00SunnyDay00","followers_url":"https://api.github.com/users/00SunnyDay00/followers","following_url":"https://api.github.com/users/00SunnyDay00/following{/other_user}","gists_url":"https://api.github.com/users/00SunnyDay00/gists{/gist_id}","starred_url":"https://api.github.com/users/00SunnyDay00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00SunnyDay00/subscriptions","organizations_url":"https://api.github.com/users/00SunnyDay00/orgs","repos_url":"https://api.github.com/users/00SunnyDay00/repos","events_url":"https://api.github.com/users/00SunnyDay00/events{/privacy}","received_events_url":"https://api.github.com/users/00SunnyDay00/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alibaba/weex/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/alibaba/weex/labels/js%20framework","name":"js framework","color":"f9d0c4"}],"state":"open","locked":false,"assignee":{"login":"Hanks10100","id":8401776,"avatar_url":"https://avatars.githubusercontent.com/u/8401776?v=3","gravatar_id":"","url":"https://api.github.com/users/Hanks10100","html_url":"https://github.com/Hanks10100","followers_url":"https://api.github.com/users/Hanks10100/followers","following_url":"https://api.github.com/users/Hanks10100/following{/other_user}","gists_url":"https://api.github.com/users/Hanks10100/gists{/gist_id}","starred_url":"https://api.github.com/users/Hanks10100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hanks10100/subscriptions","organizations_url":"https://api.github.com/users/Hanks10100/orgs","repos_url":"https://api.github.com/users/Hanks10100/repos","events_url":"https://api.github.com/users/Hanks10100/events{/privacy}","received_events_url":"https://api.github.com/users/Hanks10100/received_events","type":"User","site_admin":false},"assignees":[{"login":"Hanks10100","id":8401776,"avatar_url":"https://avatars.githubusercontent.com/u/8401776?v=3","gravatar_id":"","url":"https://api.github.com/users/Hanks10100","html_url":"https://github.com/Hanks10100","followers_url":"https://api.github.com/users/Hanks10100/followers","following_url":"https://api.github.com/users/Hanks10100/following{/other_user}","gists_url":"https://api.github.com/users/Hanks10100/gists{/gist_id}","starred_url":"https://api.github.com/users/Hanks10100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hanks10100/subscriptions","organizations_url":"https://api.github.com/users/Hanks10100/orgs","repos_url":"https://api.github.com/users/Hanks10100/repos","events_url":"https://api.github.com/users/Hanks10100/events{/privacy}","received_events_url":"https://api.github.com/users/Hanks10100/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-28T08:23:55Z","updated_at":"2016-09-28T10:02:26Z","closed_at":null,"body":"复现步骤\r\n（1）使用repeat进行LIst展示。\r\n如果采用以下的语法：\r\n\r\n```html\r\n<div repeat=\"{{dataList}}\">\r\n  <div class=\"itemContent\" if=\"{{_item_style==='hide'}}\">\r\n    <text class=\"titleCenter\">{{_title}}</text>\r\n  </div>\r\n</div>\r\n```\r\n\r\n现象：\r\n会出现以下划线开头的变量无法正常获取值。\r\n上述例子中_item_style 和_title 都无法获取到正常值。\r\n如果重命名去掉下划线，值获取正常。\r\n\r\n注：如果使用\r\n\r\n```html\r\n<div repeat=\"item in dataList\">\r\n  <div class=\"itemContent\" if=\"{{item._item_style==='hide'}}\">\r\n    <text class=\"titleCenter\">{{item._title}}</text>\r\n  </div>\r\n</div>\r\n```\r\n\r\n显示正常，值正常获取。"},"comment":{"url":"https://api.github.com/repos/alibaba/weex/issues/comments/250125094","html_url":"https://github.com/alibaba/weex/issues/1327#issuecomment-250125094","issue_url":"https://api.github.com/repos/alibaba/weex/issues/1327","id":250125094,"user":{"login":"Hanks10100","id":8401776,"avatar_url":"https://avatars.githubusercontent.com/u/8401776?v=3","gravatar_id":"","url":"https://api.github.com/users/Hanks10100","html_url":"https://github.com/Hanks10100","followers_url":"https://api.github.com/users/Hanks10100/followers","following_url":"https://api.github.com/users/Hanks10100/following{/other_user}","gists_url":"https://api.github.com/users/Hanks10100/gists{/gist_id}","starred_url":"https://api.github.com/users/Hanks10100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hanks10100/subscriptions","organizations_url":"https://api.github.com/users/Hanks10100/orgs","repos_url":"https://api.github.com/users/Hanks10100/repos","events_url":"https://api.github.com/users/Hanks10100/events{/privacy}","received_events_url":"https://api.github.com/users/Hanks10100/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T10:02:26Z","updated_at":"2016-09-28T10:02:26Z","body":"因为在编译 `repeat` 指令时，每条数据都会使用 `mergeContext` 以父 `vm` 为原型对象创建子 `vm`，过程中会执行 `initData(dataList[n])` 创建数据绑定。\r\n\r\n在执行绑定过程中 `vm._data` 中的属性名会经过过滤（避免与 vm 内部属性重名），过滤掉以 `$` 和 `_` 开头的属性：\r\n```js\r\n// https://github.com/alibaba/weex/blob/dev/html5/default/util/index.js#L19\r\nfunction isReserved (str) {\r\n  const c = (str + '').charCodeAt(0)\r\n  return c === 0x24 || c === 0x5F\r\n}\r\n```\r\n\r\n该方法只会过滤 `vm._data` 直接子级的属性名，如果是形如 `repeat=\"item in dataLint\"` 的绑定，`vm._data` 的直接子属性将是 `item`，不会被过滤。"}}
{"actor":{"display_login":"Hanks10100"}}