vue & dynamic components
vue & dynamic components
https://vuejs.org/v2/guide/components-dynamic-async.html
keep-alive
https://cn.vuejs.org/v2/api/#keep-alive
<keep-alive>
<component v-bind:is="currentTabComponent"></component>
</keep-alive>
webpack & vue router
dynamic import
https://router.vuejs.org/zh/guide/advanced/lazy-loading.html
const Foo = () => import(/* webpackChunkName: "group-foo" */ './Foo.vue')
const Bar = () => import(/* webpackChunkName: "group-foo" */ './Bar.vue')
const Baz = () => import(/* webpackChunkName: "group-foo" */ './Baz.vue')
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12391178.html
未经授权禁止转载,违者必究!