vue無刷新修改url參數

import merge from 'webpack-merge';
 
修改原有參數        
this.$router.push({
    query:merge(this.$route.query,{'maxPrice':'630'})
})
 
新增一個參數:
this.$router.push({
    query:merge(this.$route.query,{'addParams':'我是新增的一個參數,哈哈哈哈'})
})
 
替換所有參數:
 this.$router.push({
    query:merge({},{'maxPrice':'630'})

 

來源:https://blog.csdn.net/sllailcp/article/details/80312848

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章