Warning: Please use `require("history").createHashHistory` instead of `require("history/createHashHistory")`. Support for the latter will be removed in the next major release.


history:

直接刷新會404,需要404重定向;

hash:

僅存在於前端,前端路由修改的是#中的信息,在服務端會被忽略。

 

首先。

找到node_modules=>dva包=>lib文件夾=>index.js

 

修改

 

重啟 刷新

仍有警告的話。。

找到src=>index.js

重啟刷新

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM