js文件中获取vue路由

import router from './router/router'
console.log(router.currentRoute.path)
Last Updated:
Contributors: haizhiguang