在dvajs中,若是你在初始化dva對象的時候不做任何處理,那麼你就會發現即便你是用了BrowserRouter來做爲Router url中也是會出現#/。解決方法也很簡單:git
$ npm install history --save
參考:https://github.com/dvajs/dva/issues/1268import { createBrowserHistory as createHistory } from 'history'; const app = dva({ history: createHistory() });