vue 關於路由跳轉方法

關於路由跳轉方法:push this.$router.push({name:'master',params:{id:'參數'}}); //name和params搭配,刷新的話,參數會消失 this.$router.push({path:'/master',query:{id:'參數'}}); //path和query搭配,刷新頁面的話,url中的參數不會丟失,query中的參數成了url中的一部
相關文章
相關標籤/搜索