{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/5577","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/5577/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/5577/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/5577/events","html_url":"https://github.com/vuejs/vue/issues/5577","id":225740997,"number":5577,"title":"v-model directive doesn't set according prop value in child component (only when using single file comp)","user":{"login":"chvelkov","id":5675897,"avatar_url":"https://avatars3.githubusercontent.com/u/5675897?v=3","gravatar_id":"","url":"https://api.github.com/users/chvelkov","html_url":"https://github.com/chvelkov","followers_url":"https://api.github.com/users/chvelkov/followers","following_url":"https://api.github.com/users/chvelkov/following{/other_user}","gists_url":"https://api.github.com/users/chvelkov/gists{/gist_id}","starred_url":"https://api.github.com/users/chvelkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chvelkov/subscriptions","organizations_url":"https://api.github.com/users/chvelkov/orgs","repos_url":"https://api.github.com/users/chvelkov/repos","events_url":"https://api.github.com/users/chvelkov/events{/privacy}","received_events_url":"https://api.github.com/users/chvelkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-02T15:58:19Z","updated_at":"2017-05-02T15:58:19Z","closed_at":null,"body":"### Version\r\n2.3.0\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/h864k3yj/](https://jsfiddle.net/h864k3yj/)\r\n\r\n### Steps to reproduce\r\nOpen the JSFiddle with vue 2.3.0 and then with with 2.2.6.\r\n\r\nThe result will be different:\r\n\r\nWith 2.3.0  the value prop is not set and the HTML output will be \"PASSED PROP:\". \r\nHowever with 2.2.6 the app will render \"PASSED PROP: From parent\" \r\n\r\nHere is the code with the two different versions:\r\n\r\n2.3.1: https://jsfiddle.net/h864k3yj/ \r\n2.2.6: https://jsfiddle.net/gsexe735/\r\n\r\nDiscussion in Vue Forum about this issue: \r\nhttps://forum.vuejs.org/t/vue-2-3-0-reusable-components-v-model-issue/10194/7\r\n\r\n### What is expected?\r\nThe ```value``` prop of the child component should be set to \"From parent\"\r\n\r\n### What is actually happening?\r\n```value``` is undefined when using vue 2.3.0 \r\n\r\n---\r\nI've noticed the issue a few days ago, but the tricky part to reproduce it was the fact that this only happens when using these render functions (which were generated by webpack/vue-loader).\r\n\r\nHere's the original source of the two components, which were processed by vue-loader to create the render functions:\r\n\r\n\r\nThe child component, which doesn't receive the prop value:\r\n```javascript\r\n\r\n<template>\r\n    <div>PASSED PROP:{{value}}</div>\r\n</template>\r\n\r\n<script>\r\n    module.exports = {\r\n        props: {\r\n            value: String,\r\n        }\r\n    };\r\n</script>\r\n```\r\n\r\nThe parent:\r\n```javascript\r\n\r\n<template>\r\n    <test-comp v-model=\"customVal\"></test-comp>\r\n</template>\r\n\r\n<script>\r\n    module.exports = {\r\n        data: function() {\r\n            return {\r\n                customVal: 'Value from parent',\r\n            }\r\n        },\r\n        components: {\r\n            'test-comp': require('test-comp.vue'),\r\n        }\r\n    };\r\n</script>\r\n\r\n```\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"}}
{"actor":{"display_login":"chvelkov"}}