Open Yan1 opened 2 years ago
在主应用或子应用中,通过 <Link to={{pathname: xxx, query: xxx}}>to About</Link>进入的页面中,location.query 为空
<Link to={{pathname: xxx, query: xxx}}>to About</Link>
Provide a mini GitHub repository which can reproduce the issue.
https://codesandbox.io/s/determined-antonelli-xb48oj?file=/src/index.js
从首页中to about进去about页面,控制台打印的location无query字段;
将index.js中start(); 注释掉,再重复第一步操作,location有query字段
"react": "18.0.0", "react-dom": "18.0.0", "react-scripts": "4.0.0", "react-router-dom": "^5.3.0", "qiankun": "^2.7.0"
你好,请问找到原因了吗,我也遇到这个问题了
没有呀,只能暂时不用 location.query 传信息
location.query
What happens?
在主应用或子应用中,通过
<Link to={{pathname: xxx, query: xxx}}>to About</Link>
进入的页面中,location.query 为空Mini Showcase Repository(REQUIRED)
https://codesandbox.io/s/determined-antonelli-xb48oj?file=/src/index.js
How To Reproduce
从首页中to about进去about页面,控制台打印的location无query字段;
将index.js中start(); 注释掉,再重复第一步操作,location有query字段
Context