{"action":"created","issue":{"url":"https://api.github.com/repos/ElemeFE/element/issues/4681","repository_url":"https://api.github.com/repos/ElemeFE/element","labels_url":"https://api.github.com/repos/ElemeFE/element/issues/4681/labels{/name}","comments_url":"https://api.github.com/repos/ElemeFE/element/issues/4681/comments","events_url":"https://api.github.com/repos/ElemeFE/element/issues/4681/events","html_url":"https://github.com/ElemeFE/element/pull/4681","id":226463898,"number":4681,"title":"DatePicker: fix, add test for unwanted 'input' event emission","user":{"login":"wacky6","id":9319556,"avatar_url":"https://avatars2.githubusercontent.com/u/9319556?v=3","gravatar_id":"","url":"https://api.github.com/users/wacky6","html_url":"https://github.com/wacky6","followers_url":"https://api.github.com/users/wacky6/followers","following_url":"https://api.github.com/users/wacky6/following{/other_user}","gists_url":"https://api.github.com/users/wacky6/gists{/gist_id}","starred_url":"https://api.github.com/users/wacky6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacky6/subscriptions","organizations_url":"https://api.github.com/users/wacky6/orgs","repos_url":"https://api.github.com/users/wacky6/repos","events_url":"https://api.github.com/users/wacky6/events{/privacy}","received_events_url":"https://api.github.com/users/wacky6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-05T03:27:40Z","updated_at":"2017-05-12T03:15:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ElemeFE/element/pulls/4681","html_url":"https://github.com/ElemeFE/element/pull/4681","diff_url":"https://github.com/ElemeFE/element/pull/4681.diff","patch_url":"https://github.com/ElemeFE/element/pull/4681.patch"},"body":"Fixes issue: https://github.com/ElemeFE/element/issues/4624\r\n\r\nPlease make sure these boxes are checked before submitting your PR, thank you!\r\n\r\n* [x] Make sure you follow Element's contributing guide ([中文](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.md) | [English](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.en-US.md)).\r\n* [x] Make sure you are merging your commits to `dev` branch.\r\n* [x] Add some descriptions and refer relative issues for you PR.\r\n\r\n\r\n#### 做了什么\r\n修复Issue：https://github.com/ElemeFE/element/issues/4624\r\npick事件中，如果pick的值与当前值相等，不发射input\r\n\r\n修改后的行为参照了原生`<Select>`，仅在选定的值发生变化时才发射input事件：https://jsfiddle.net/wacky6/a7ffgjdt/\r\n\r\n增加了以上行为相关的测试代码\r\n\r\n#### Demo\r\nhttps://jsfiddle.net/wacky6/wya53tm9/2/\r\n\r\n#### Issue原因\r\n`type=range`时，它的数据为数组，发射 input 事件中的新建的数组与原数组必然不全等（`===`），触发了watch。\r\n但`type=range`时，它的数据为Date对象，但不会发生Issue所述现象，尚未进一步挖掘原因。\r\n\r\n推测 Vue 的 Watcher 有 Date 相关逻辑？"},"comment":{"url":"https://api.github.com/repos/ElemeFE/element/issues/comments/300973150","html_url":"https://github.com/ElemeFE/element/pull/4681#issuecomment-300973150","issue_url":"https://api.github.com/repos/ElemeFE/element/issues/4681","id":300973150,"user":{"login":"lry210","id":12726826,"avatar_url":"https://avatars1.githubusercontent.com/u/12726826?v=3","gravatar_id":"","url":"https://api.github.com/users/lry210","html_url":"https://github.com/lry210","followers_url":"https://api.github.com/users/lry210/followers","following_url":"https://api.github.com/users/lry210/following{/other_user}","gists_url":"https://api.github.com/users/lry210/gists{/gist_id}","starred_url":"https://api.github.com/users/lry210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lry210/subscriptions","organizations_url":"https://api.github.com/users/lry210/orgs","repos_url":"https://api.github.com/users/lry210/repos","events_url":"https://api.github.com/users/lry210/events{/privacy}","received_events_url":"https://api.github.com/users/lry210/received_events","type":"User","site_admin":false},"created_at":"2017-05-12T03:15:38Z","updated_at":"2017-05-12T03:15:38Z","body":"When will it be updated?"}}
{"actor":{"display_login":"lry210"}}