如何从ReactJS组件中获取完整的URL?
我想它应该是这样的this.props.location,但它是undefined
this.props.location
undefined
window.location.href 是您要寻找的。
window.location.href