继承自React.Component的
this.props.location.query对象下
有当前url的各种查询参数。
简单的例子:在控制台打印这个对象

import React from 'react';
class Hello extends React.Component{
    constructor(props) {
        super(props);
        console.log(this.props.location.query);
    }
    render() {
        return(<div>我是hello页面</div>);
    }
 
}
 
module.exports =  Hello;

  

相关文章:

  • 2021-12-13
  • 2022-01-31
  • 2021-10-18
  • 2021-12-26
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-06-29
  • 2021-09-26
  • 2022-12-23
  • 2021-09-12
  • 2023-02-13
  • 2021-05-16
相关资源
相似解决方案