{"action":"created","issue":{"url":"https://api.github.com/repos/jayZOU/watch/issues/6","repository_url":"https://api.github.com/repos/jayZOU/watch","labels_url":"https://api.github.com/repos/jayZOU/watch/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/jayZOU/watch/issues/6/comments","events_url":"https://api.github.com/repos/jayZOU/watch/issues/6/events","html_url":"https://github.com/jayZOU/watch/issues/6","id":373367175,"node_id":"MDU6SXNzdWUzNzMzNjcxNzU=","number":6,"title":"watch.setData 监听不到多层数据的oldVal","user":{"login":"blogwy","id":29158253,"node_id":"MDQ6VXNlcjI5MTU4MjUz","avatar_url":"https://avatars0.githubusercontent.com/u/29158253?v=4","gravatar_id":"","url":"https://api.github.com/users/blogwy","html_url":"https://github.com/blogwy","followers_url":"https://api.github.com/users/blogwy/followers","following_url":"https://api.github.com/users/blogwy/following{/other_user}","gists_url":"https://api.github.com/users/blogwy/gists{/gist_id}","starred_url":"https://api.github.com/users/blogwy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blogwy/subscriptions","organizations_url":"https://api.github.com/users/blogwy/orgs","repos_url":"https://api.github.com/users/blogwy/repos","events_url":"https://api.github.com/users/blogwy/events{/privacy}","received_events_url":"https://api.github.com/users/blogwy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-24T08:38:15Z","updated_at":"2018-10-24T11:14:58Z","closed_at":"2018-10-24T11:12:10Z","author_association":"NONE","body":"--当前的表现\r\n        a: function(val, oldVal) {\r\n            console.log('new: %s, old: %s', val, oldVal);\r\n        },\r\n        'b.c.d': function(val, oldVal) {\r\n            console.log('new: %s, old: %s', val, oldVal);\r\n        }\r\n写了一个按钮，用watch.setData来改变a 和 b.c.d的值，发现可以监听到a的当前值和以前的值，b.c.d监听到两个值都是当前值。"},"comment":{"url":"https://api.github.com/repos/jayZOU/watch/issues/comments/432615078","html_url":"https://github.com/jayZOU/watch/issues/6#issuecomment-432615078","issue_url":"https://api.github.com/repos/jayZOU/watch/issues/6","id":432615078,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjYxNTA3OA==","user":{"login":"jayZOU","id":8576977,"node_id":"MDQ6VXNlcjg1NzY5Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/8576977?v=4","gravatar_id":"","url":"https://api.github.com/users/jayZOU","html_url":"https://github.com/jayZOU","followers_url":"https://api.github.com/users/jayZOU/followers","following_url":"https://api.github.com/users/jayZOU/following{/other_user}","gists_url":"https://api.github.com/users/jayZOU/gists{/gist_id}","starred_url":"https://api.github.com/users/jayZOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayZOU/subscriptions","organizations_url":"https://api.github.com/users/jayZOU/orgs","repos_url":"https://api.github.com/users/jayZOU/repos","events_url":"https://api.github.com/users/jayZOU/events{/privacy}","received_events_url":"https://api.github.com/users/jayZOU/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T11:14:58Z","updated_at":"2018-10-24T11:14:58Z","author_association":"OWNER","body":"已解决，这里我忽略了Object.assign无法深克隆嵌套数据的问题，改用`JSON.parse(JSON.stringify(this.page.data))`方式来解决，虽然针对function和undefined类型无法copy，但是因为小程序的data使用的原因，使用JSON做深克隆就可以的\r\n![image](https://user-images.githubusercontent.com/8576977/47426842-06f24200-d7c1-11e8-81df-21337e110b40.png)\r\n\r\n"}}
{"actor":{"display_login":"jayZOU"}}