vue使用router中的that.$router.push({name:‘User‘})实现vue界面跳转(CSDN亲测可用)
vue使用router中的that.$router.push({name:‘User’})实现vue界面跳转(CSDN亲测可用)先给大家看一下效果登录成功后1.首先安装router执行命令 npm install vue-router2.在src下创建名字为router的文件夹,在该文件夹下创建index.js文件如下图所示:index.js的内容为:import Vue from ‘vue’ //引入Vueimport VueRouter from ‘vue-router’
原创
2021-11-20 15:48:55 ·
1860 阅读 ·
1 评论