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

[vue] 怎么实现路由懒加载呢? #374

Open
haizhilin2013 opened this issue Jun 20, 2019 · 5 comments
Open

[vue] 怎么实现路由懒加载呢? #374

haizhilin2013 opened this issue Jun 20, 2019 · 5 comments
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] 怎么实现路由懒加载呢?

@haizhilin2013 haizhilin2013 added the vue vue label Jun 20, 2019
@tjNane
Copy link

tjNane commented Jun 28, 2019

import异步加载

@Zjingbo
Copy link

Zjingbo commented Jul 2, 2019

百度的话有很多方法,不过我一般都用箭头函数的方法 component:()=>import('组件路径')

@miqidian
Copy link

miqidian commented Aug 6, 2019

resolve

@iugu516
Copy link

iugu516 commented Sep 11, 2019

const component = () =>import('./....')

@WenJieLi1998
Copy link

1.vue的异步组件:resolve=>require(['需要异步加载的组件'],resolve)
2.es6的import方法:()=>import(需要异步加载的组件)
3.webpack的 require.ensure: r => require.ensure([],()=>r( require(需要异步加载的组件)),chunkName)

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

No branches or pull requests

6 participants