vue 改变路由(URL)参数不刷新页面
vue
vuejs/vue: 是一个用于构建用户界面的 JavaScript 框架,具有简洁的语法和丰富的组件库,可以用于开发单页面应用程序和多页面应用程序。
项目地址:https://gitcode.com/gh_mirrors/vu/vue
免费下载资源
·
this.$router.push({
name:'/detail',
query:{
id:123
}
})
import merge from 'webpack-merge';
//修改原有参数
this.$router.push({
query:merge(this.$route.query,{'id':1})
})
//新增一个参数:
this.$router.push({
query:merge(this.$route.query,{'addtype':'add'})
})
//替换所有参数:
this.$router.push({
query:merge({},{'type':'all'})
})
会导致
this.$router.back() //失效
通过这样跳转
this.$router.push({
name:'/page',
})
GitHub 加速计划 / vu / vue
207.52 K
33.66 K
下载
vuejs/vue: 是一个用于构建用户界面的 JavaScript 框架,具有简洁的语法和丰富的组件库,可以用于开发单页面应用程序和多页面应用程序。
最近提交(Master分支:1 个月前 )
73486cb5
* chore: fix link broken
Signed-off-by: snoppy <michaleli@foxmail.com>
* Update packages/template-compiler/README.md [skip ci]
---------
Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> 3 个月前
e428d891
Updated Browser Compatibility reference. The previous currently returns HTTP 404. 3 个月前
更多推荐
已为社区贡献11条内容
所有评论(0)