📅  最后修改于: 2022-03-11 15:02:25.597000             🧑  作者: Mango
import { useLocation } from 'react-router-dom'
function HeaderView() {
const location = useLocation();
console.log(location.pathname);
return Path : {location.pathname}
}