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
{ path: 'profile/phone', getComponent(nextState, cb) { require.ensure([], (require) => { if(!checkModel['profile/phone']){ let result = app.model(require('../models/phone')); //手机绑定 checkModel['profile/phone'] = true //防止重复加载 } cb(null, require('./profile/PhonePage')) }) } }
在require.ensure([], (require) => { 里面去做app.model的时候第一次进入没错, 后面进入就报重复加载model, 有没有一个model有否重复加载的机制去防止, 现在我自己实现checkModel对象去保存加载情况, 有点啰嗦
The text was updated successfully, but these errors were encountered:
#460
Sorry, something went wrong.
对动态加载的问题总结了下,有问题在 #533 里跟进。
No branches or pull requests
{ path: 'profile/phone', getComponent(nextState, cb) { require.ensure([], (require) => { if(!checkModel['profile/phone']){ let result = app.model(require('../models/phone')); //手机绑定 checkModel['profile/phone'] = true //防止重复加载 } cb(null, require('./profile/PhonePage')) }) } }
在require.ensure([], (require) => { 里面去做app.model的时候第一次进入没错, 后面进入就报重复加载model, 有没有一个model有否重复加载的机制去防止, 现在我自己实现checkModel对象去保存加载情况, 有点啰嗦
The text was updated successfully, but these errors were encountered: