dva生成的项目中,不使用任何history的时候,路由上带#,例如http://localhost:7000/#/
如果这样定义你路由
import dva from 'dva'
import createLoading from 'dva-loading'
import { message } from 'antd'
import { reducer as formReducer } from 'redux-form'
import createHistory from 'history/createHashHistory'
import 'antd/dist/antd.less'
import './less/index.less'
const historys = createHistory();
// 1. Initialize
const app = dva({
history: historys,
extraReducers: {
form: formReducer
},
onError: (e) => {
message.error(`错误:${e.message}`, 3)
}
})
app.use(createLoading())
app.router(require('./router'))
app.start('#root')
结果依然没有出现_k
那怎么定义才可以出现_k=。。。。这个参数呢
慕姐8265434
相关分类