this.$router跳转 带参数
发布日期:2021-06-30 21:42:40 浏览次数:2 分类:技术文章

本文共 409 字,大约阅读时间需要 1 分钟。

不带参数

this.$router.push('/xqgl/ysjhgl/cjysjh'); //  路径:'/xqgl/ysjhgl/cjysjh'

带参数

this.$router.push({name: 'Ysjhdetail', params: {num_id: val}}); // 路径名name

参数获取

created() {    this.pkid = this.$route.params.num_id;}

routes.js文件

import Ysjhdetail from '../views/xqgl/ysjhgl/Ysjhdetail.vue'let routes = {    path: '/xqgl/ysjhgl/ysjhdetail',    component: Ysjhdetail,    name: 'Ysjhdetail' }export default routes;

转载地址:https://local.blog.csdn.net/article/details/80019568 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:el-tabs事件绑定(Element UI)
下一篇:判断各种浏览器

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月15日 22时30分24秒