vue2的获取方法
js
this.$route.path
vue3选项式api获取方法
js
import { useRouter } from 'vue-router';
const router = useRouter();
console.log(router)
console.log(router.currentRoute.value.path)