vue 获取当前页面路由

2019-12-02  本文已影响0人  前端新阳

代码如下:

watch: {
    $route(to, from) {
         console.log(this.$route.path);
    }
},
上一篇 下一篇

猜你喜欢

热点阅读