vue怎么实现本项目页面之间跳转(vue,开发技术)

时间:2024-05-03 21:42:08 作者 : 石家庄SEO 分类 : 开发技术
  • TAG :

本项目页面之间跳转方式

在template模板中添加

button按钮加入click事件

<el-buttontype="primary"@click="func()">添加试题</el-button>

在methods中写入路径

func(){this.$router.push({path:"add-question"});},

修改路由文件

加入所有跳转的本地界面

vue怎么实现本项目页面之间跳转

vue解决页面跳转问题

问题描述:两个不同的页面,进行带参数跳转

解决办法

1、需要跳转的页面,创建跳转方法。

//@click="PageJump(scope.row)"//具体如下:<el-table-columnlabel="跳转页面"align="center"class-name="small-paddingfixed-width"><templateslot-scope="scope"><el-buttonsize="mini"type="text"icon="el-icon-view"@click="PageJump(scope.row)">点击跳转</el-button></template></el-table-column>PageJump(row){this.$router.push({path:"/页面/具体/路径/"+row.id,params:{id:row.id}});}

2、配置路由(一般是router.js文件)

{path:'/文件目录路径',component:Layout,hidden:true,children:[{path:'PageJump/data/:OtherId(\\d+)',component:(resolve)=>require(['@/views/跳转到的页面路径/index'],resolve),name:'PageJump',meta:{title:'跳转到的页面',icon:''}}]}

按照这样基本可以完成带参数的页面跳转。

 </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
本文:vue怎么实现本项目页面之间跳转的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:Android Studio怎么实现登录界面功能下一篇:

8 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18