{"action":"created","issue":{"url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/140","repository_url":"https://api.github.com/repos/Meituan-Dianping/mpvue","labels_url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/140/comments","events_url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/140/events","html_url":"https://github.com/Meituan-Dianping/mpvue/issues/140","id":306818415,"number":140,"title":"同一路由切换时，上一次的页面数据会保留","user":{"login":"KennyWho","id":7511329,"avatar_url":"https://avatars2.githubusercontent.com/u/7511329?v=4","gravatar_id":"","url":"https://api.github.com/users/KennyWho","html_url":"https://github.com/KennyWho","followers_url":"https://api.github.com/users/KennyWho/followers","following_url":"https://api.github.com/users/KennyWho/following{/other_user}","gists_url":"https://api.github.com/users/KennyWho/gists{/gist_id}","starred_url":"https://api.github.com/users/KennyWho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KennyWho/subscriptions","organizations_url":"https://api.github.com/users/KennyWho/orgs","repos_url":"https://api.github.com/users/KennyWho/repos","events_url":"https://api.github.com/users/KennyWho/events{/privacy}","received_events_url":"https://api.github.com/users/KennyWho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-20T11:03:07Z","updated_at":"2018-03-23T07:48:01Z","closed_at":null,"author_association":"NONE","body":"同一级路由进入退出再进入另一个路由时，数据会先显示上一次的，闪一下才会显示新数据。\r\n生命周期用onShow和mounted都会出现这个问题。直接用小程序不会出现。\r\n![issue](https://user-images.githubusercontent.com/7511329/37651124-12bf885e-2c72-11e8-9fda-f87ad65fb579.gif)\r\n\r\n非mpvue小程序写的\r\n![normal](https://user-images.githubusercontent.com/7511329/37651195-4cb25532-2c72-11e8-831b-eea1d22acf94.gif)\r\n\r\n虽然可以在unload事件之后清空数据，但是感觉不是最好的解决方法。"},"comment":{"url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/comments/375570361","html_url":"https://github.com/Meituan-Dianping/mpvue/issues/140#issuecomment-375570361","issue_url":"https://api.github.com/repos/Meituan-Dianping/mpvue/issues/140","id":375570361,"user":{"login":"KennyWho","id":7511329,"avatar_url":"https://avatars2.githubusercontent.com/u/7511329?v=4","gravatar_id":"","url":"https://api.github.com/users/KennyWho","html_url":"https://github.com/KennyWho","followers_url":"https://api.github.com/users/KennyWho/followers","following_url":"https://api.github.com/users/KennyWho/following{/other_user}","gists_url":"https://api.github.com/users/KennyWho/gists{/gist_id}","starred_url":"https://api.github.com/users/KennyWho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KennyWho/subscriptions","organizations_url":"https://api.github.com/users/KennyWho/orgs","repos_url":"https://api.github.com/users/KennyWho/repos","events_url":"https://api.github.com/users/KennyWho/events{/privacy}","received_events_url":"https://api.github.com/users/KennyWho/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T07:48:01Z","updated_at":"2018-03-23T07:48:01Z","author_association":"NONE","body":"@anchengjian 现在遇到一个新的问题，如果是在一个组件内，切换页面，然后回到这个页面，这个组件不会触发created事件，响应的computed等也没有运行。因为数据是从上一层继承的props所以没法做清空数据。"}}
{"actor":{"display_login":"KennyWho"}}