How to set URL query params in Vue with Vue-Router

前端 未结 9 812
梦如初夏
梦如初夏 2020-12-23 20:24

I am trying to set query params with Vue-router when changing input fields, I don\'t want to navigate to some other page but just want to modify url query params on the same

9条回答
  •  清酒与你
    2020-12-23 20:46

    Actually you can just push query like this: this.$router.push({query: {plan: 'private'}})

    Based on: https://github.com/vuejs/vue-router/issues/1631

提交回复
热议问题