摘要: 使用 componentWillReceiveProps(newProps) 函数,当 props 改变时,我们就可以在该函数中通过 newProps.match.params.id 拿到新的url参数,进而进行更新。如下 componentWillReceiveProps(newProps) { 阅读全文
posted @ 2020-01-11 17:36 每天都要进步一点点 阅读(2880) 评论(0) 推荐(0)