摘要:
import axios from 'axios'; import router from 'vue-router' import { Message } from 'element-ui' // axios.defaults.timeout = 5000; // axios.defaults.ba 阅读全文
posted @ 2020-08-10 13:35
syqaily
阅读(221)
评论(0)
推荐(0)
摘要:
方案一: getDescribe(id) { // 直接调用$router.push 实现携带参数的跳转 this.$router.push({ path: `/describe/${id}`, }) 方案一,需要对应路由配置如下: { path: '/describe/:id', name: 'D 阅读全文
posted @ 2020-08-10 11:57
syqaily
阅读(152)
评论(0)
推荐(0)
摘要:
全局路由钩子: router.beforeEach((to, from, next) => { //会在任意路由跳转前执行,next一定要记着执行,不然路由不能跳转了 console.log('beforeEach') console.log(to,from) // next() }) // rou 阅读全文
posted @ 2020-08-10 11:44
syqaily
阅读(255)
评论(0)
推荐(0)

浙公网安备 33010602011771号