{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/9041","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/9041/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/9041/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/9041/events","html_url":"https://github.com/vuejs/vue/issues/9041","id":378567839,"node_id":"MDU6SXNzdWUzNzg1Njc4Mzk=","number":9041,"title":"prop did't produce right value ","user":{"login":"yangjunjun","id":1180563,"node_id":"MDQ6VXNlcjExODA1NjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1180563?v=4","gravatar_id":"","url":"https://api.github.com/users/yangjunjun","html_url":"https://github.com/yangjunjun","followers_url":"https://api.github.com/users/yangjunjun/followers","following_url":"https://api.github.com/users/yangjunjun/following{/other_user}","gists_url":"https://api.github.com/users/yangjunjun/gists{/gist_id}","starred_url":"https://api.github.com/users/yangjunjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangjunjun/subscriptions","organizations_url":"https://api.github.com/users/yangjunjun/orgs","repos_url":"https://api.github.com/users/yangjunjun/repos","events_url":"https://api.github.com/users/yangjunjun/events{/privacy}","received_events_url":"https://api.github.com/users/yangjunjun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-08T03:49:03Z","updated_at":"2018-11-08T04:07:27Z","closed_at":"2018-11-08T04:07:27Z","author_association":"NONE","body":"### Version\r\n2.5.17\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/yangjunjun/eywraw8t/450799/](https://jsfiddle.net/yangjunjun/eywraw8t/450799/)\r\n\r\n\r\n\r\n\r\n\r\n### Steps to reproduce\r\nsee the demo, it's simple \r\n\r\n### What is expected?\r\nthe first prop 'val' should be  empty string \r\n\r\n### What is actually happening?\r\nthe first prop 'val' is true\r\n\r\n---\r\nwhen I  create a checkbox-like component which  has a props \"value\" who accept  Boolean String type.  when an empty string was  assign to the \"value\" but the actual value  is \"true\", it's  weird.\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/436866758","html_url":"https://github.com/vuejs/vue/issues/9041#issuecomment-436866758","issue_url":"https://api.github.com/repos/vuejs/vue/issues/9041","id":436866758,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjg2Njc1OA==","user":{"login":"Justineo","id":1726061,"node_id":"MDQ6VXNlcjE3MjYwNjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1726061?v=4","gravatar_id":"","url":"https://api.github.com/users/Justineo","html_url":"https://github.com/Justineo","followers_url":"https://api.github.com/users/Justineo/followers","following_url":"https://api.github.com/users/Justineo/following{/other_user}","gists_url":"https://api.github.com/users/Justineo/gists{/gist_id}","starred_url":"https://api.github.com/users/Justineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Justineo/subscriptions","organizations_url":"https://api.github.com/users/Justineo/orgs","repos_url":"https://api.github.com/users/Justineo/repos","events_url":"https://api.github.com/users/Justineo/events{/privacy}","received_events_url":"https://api.github.com/users/Justineo/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T04:07:27Z","updated_at":"2018-11-08T04:07:27Z","author_association":"MEMBER","body":"As you declared the prop as type `[Boolean, String]`, Vue would try to figure out it can be treated as a boolean value first. And for boolean props, as long as it exists it's regarded as truthy.\r\n\r\n```html\r\n<!-- the following declarations are equivalent -->\r\n<input disabled>\r\n<input disabled=\"\">\r\n<input disabled=\"whatever\">\r\n```\r\n\r\nYou can declare the type as `[String, Boolean]` if you want to regard the value as string first."}}
{"actor":{"display_login":"Justineo"}}