{"action":"created","issue":{"url":"https://api.github.com/repos/yyx990803/vue/issues/824","labels_url":"https://api.github.com/repos/yyx990803/vue/issues/824/labels{/name}","comments_url":"https://api.github.com/repos/yyx990803/vue/issues/824/comments","events_url":"https://api.github.com/repos/yyx990803/vue/issues/824/events","html_url":"https://github.com/yyx990803/vue/issues/824","id":74218964,"number":824,"title":"Component inline-template with v-repeat in <template>","user":{"login":"qrotux","id":12318929,"avatar_url":"https://avatars.githubusercontent.com/u/12318929?v=3","gravatar_id":"","url":"https://api.github.com/users/qrotux","html_url":"https://github.com/qrotux","followers_url":"https://api.github.com/users/qrotux/followers","following_url":"https://api.github.com/users/qrotux/following{/other_user}","gists_url":"https://api.github.com/users/qrotux/gists{/gist_id}","starred_url":"https://api.github.com/users/qrotux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qrotux/subscriptions","organizations_url":"https://api.github.com/users/qrotux/orgs","repos_url":"https://api.github.com/users/qrotux/repos","events_url":"https://api.github.com/users/qrotux/events{/privacy}","received_events_url":"https://api.github.com/users/qrotux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-08T03:55:59Z","updated_at":"2015-05-08T06:52:35Z","closed_at":null,"body":"After updating from 0.11.8 to 0.11.10 catch up a bug with inline templates: \r\nVue doesn't handle component variables in template when using **template** tag with v-repeat and v-component. But with **div** tag and *replace* option anything is ok.\r\n\r\nExample: https://jsfiddle.net/nj7L5pg4/1/"},"comment":{"url":"https://api.github.com/repos/yyx990803/vue/issues/comments/100125662","html_url":"https://github.com/yyx990803/vue/issues/824#issuecomment-100125662","issue_url":"https://api.github.com/repos/yyx990803/vue/issues/824","id":100125662,"user":{"login":"dalphyx","id":1576121,"avatar_url":"https://avatars.githubusercontent.com/u/1576121?v=3","gravatar_id":"","url":"https://api.github.com/users/dalphyx","html_url":"https://github.com/dalphyx","followers_url":"https://api.github.com/users/dalphyx/followers","following_url":"https://api.github.com/users/dalphyx/following{/other_user}","gists_url":"https://api.github.com/users/dalphyx/gists{/gist_id}","starred_url":"https://api.github.com/users/dalphyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalphyx/subscriptions","organizations_url":"https://api.github.com/users/dalphyx/orgs","repos_url":"https://api.github.com/users/dalphyx/repos","events_url":"https://api.github.com/users/dalphyx/events{/privacy}","received_events_url":"https://api.github.com/users/dalphyx/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T06:52:35Z","updated_at":"2015-05-08T06:52:35Z","body":"从0.11.8升级到0.11.9和0.11.10也发生了类似的bug。\r\n定义一个component test-a如下：\r\n```javascript\r\nVue.component('test-a', {\r\n    template:\r\n        '<div v-on=\"click: onClick\">aaaa</div>',\r\n\r\n    methods: {\r\n        onClick: function(e) {\r\n            console.log(\"aaa\");\r\n        }\r\n    }\r\n});\r\n````\r\n再定义一个component test-b如下：\r\n```javascript\r\nVue.component('test-b', {\r\n    template:\r\n        '<test-a v-repeat=\"list\"></test-a>',\r\n\r\n    data: function() {\r\n        return {\r\n            list: [{time: 1}, {time: 2}, {time: 3}],\r\n        }\r\n    }\r\n});\r\n````\r\n在0.11.8中点击test-a的div里正常触发事件，在0.11.9和0.11.10中不会触发事件，只有把test-b中的template改成：\r\n```javascript\r\n'<div v-component=\"test-a\" v-repeat=\"list\"></div>'\r\n````\r\n才能得到正常结果"}}