vuejs中,怎样点击路由,切换视图,切换的视图中,再次切换相同路由

data | vue-router文档 npm packagehttp://forum.vuejs.org/topic/168/vue-router-%E8%B7%B3%E8%BD%AC%E5%90%8C%E5%90%8D%E8%B7%AF%E5%BE%84%E7%9A%84%E9%97%AE%E9%A2%98http://forum.vuejs.org/topic/720/vuerouter%E7%94%A8%E5%90%8C%E4%B8%80%E7%BB%84%E4%BB%B6%E4%B8%8D%E8%83%BD%E5%88%87%E6%8D%A2%E9%97%AE%E9%A2%98/2
■网友
方案一可行,只用在下一个组件使用ready()来把页面滚动位置设置为0就好了。var ServiceList = Vue.extend({ data: function() { return { ServiceList: {} } }, ready: function() { window.scrollTo(0, 0); }, asyncData: function(resolve, reject) { var self = this; self.$http.get(\u0026#39;data/servicelist.json\u0026#39;, function(data, status, request) { resolve({ ServiceList: data }) }).error(function(data, status, request) { }); }


    推荐阅读