xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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')


posted @ 2020-03-01 18:21  xgqfrms  阅读(409)  评论(2编辑  收藏  举报