We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dva v2.0.3 中想使用 browserHistory,在 dva API 中写法如下,但实际测试中 history 仍问 hashHistory。浏览器中输入这个地址才能正常显示:http://localhost:8000/#/products
http://localhost:8000/#/products
import { browserHistory } from 'dva/router'; const app = dva({ history: browserHistory, });
预期通过 import { browserHistory } from 'dva/router'; 导入的 browserHistory 是浏览器 history
import { browserHistory } from 'dva/router';
通过 import { browserHistory } from 'dva/router'; 导入的 browserHistory 实际测试是 hashHistory
dva版本: v2.0.3
The text was updated successfully, but these errors were encountered:
@dkvirus 此问题如何解决的?
Sorry, something went wrong.
@masogit 目前这个 bug 好像还未修复,我采用替代方案是 history 第三方库。
$ npm install history --save
import { createBrowserHistory as createHistory } from 'history'; const app = dva({ history: createHistory() });
参考这个 8480aac
奇怪,我在index.js中删除了history: browserHistory, 然后在router.js使用history包,不起作用。一定要在index.js里才行。
使用此方法后 单层路由可以访问了 但是多层路由好像就访问不了了 类似/order/news 这样的路由就访问不到了 请问是什么原因呢
No branches or pull requests
Code to reproduce the issue: (请提供可复现的代码或者步骤)
dva v2.0.3 中想使用 browserHistory,在 dva API 中写法如下,但实际测试中 history 仍问 hashHistory。浏览器中输入这个地址才能正常显示:
http://localhost:8000/#/products
Expected behavior: (预期的正常效果)
预期通过
import { browserHistory } from 'dva/router';
导入的 browserHistory 是浏览器 historyActual behavior: (实际效果)
通过
import { browserHistory } from 'dva/router';
导入的 browserHistory 实际测试是 hashHistoryVersions of packages used: (哪个库的哪个版本出现的问题)
dva版本: v2.0.3
The text was updated successfully, but these errors were encountered: