Skip to content
New issue

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": 2.6.0-beta.20版本配置无效 #2

Open
j78742 opened this issue Feb 25, 2020 · 0 comments
Open

"dva": 2.6.0-beta.20版本配置无效 #2

j78742 opened this issue Feb 25, 2020 · 0 comments

Comments

@j78742
Copy link

j78742 commented Feb 25, 2020

代码如下:
`// -> 初始化
const app = dva({
history: createHistory()
});

hot.patch(app);

// -> 插件配置
app.use(createLoading());
app.use({ onError: config.exception.global });

// -> 动态加载过渡组件
dynamic.setDefaultLoadingComponent(() => config.router.loading);

// -> 注册全局模型
app.model(require("@/models/global").default);

app.router(require('./app').default);

render(createElement(app.start()), hot.setContainer('#root'));`

更改文件会刷新浏览器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant