📅  最后修改于: 2022-03-11 15:00:23.851000             🧑  作者: Mango
const MyClassWithRouter = (props) => {
const router = useRouter()
return
}
class MyClass...
constructor(props) {
this.state = {
loc: props.router.query.loc,
loaded: false
};
}