{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/2943","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/2943/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/2943/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/2943/events","html_url":"https://github.com/vuejs/vue/issues/2943","id":156415112,"number":2943,"title":"通过props绑定数据到子组件，视图不会自动更新","user":{"login":"YeomanYang","id":19544191,"avatar_url":"https://avatars.githubusercontent.com/u/19544191?v=3","gravatar_id":"","url":"https://api.github.com/users/YeomanYang","html_url":"https://github.com/YeomanYang","followers_url":"https://api.github.com/users/YeomanYang/followers","following_url":"https://api.github.com/users/YeomanYang/following{/other_user}","gists_url":"https://api.github.com/users/YeomanYang/gists{/gist_id}","starred_url":"https://api.github.com/users/YeomanYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YeomanYang/subscriptions","organizations_url":"https://api.github.com/users/YeomanYang/orgs","repos_url":"https://api.github.com/users/YeomanYang/repos","events_url":"https://api.github.com/users/YeomanYang/events{/privacy}","received_events_url":"https://api.github.com/users/YeomanYang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-24T03:58:36Z","updated_at":"2016-05-24T03:58:36Z","closed_at":null,"body":"       我通过v-bind绑定了一个对象到子组件，也就是以下的psychologist-list，并且在子组件的props也声明了users。users通过rest api获取，并绑定到vm.$data上。但是这时候子视图并没有更新视图。但是当我在父组件中用v-if去切换这个子组件的显示与否的时候，这个子组件就被渲染出来了。\r\n       这让我想到angualr1.x中的$scope.$apply()，手动去作脏检查来更新视图。但是我了解Vue是通过setter和getter的方式来实现视图更新的，但是我在api文档中也没有找到合适的方式来解决我碰到的这个问题。\r\n附上代码片段：\r\n父组件：{\r\nhtml：\r\n<psychologist-list :users=\"users\"></psychologist-list>\r\njs：\r\nready: function() {\r\n        var self = this;\r\n        UserService.psychologistsFollowedByUser(self.$route.params.userId, function(result) {\r\n            self.users = result.data; \r\n        }, function(error) {\r\n\r\n        });\r\n    }\r\n}\r\n\r\n子组件：{\r\nhtml：<item  v-for=\"user in users\" ></item>\r\njs:    props: {\r\n        users:[]\r\n    }\r\n}"}}
{"actor":{"display_login":"YeomanYang"}}