// vue3 写法 <component :is="componentParam[active] " /> // 引入api import { defineAsyncComponent } from 'vue' const active = ref('b') const componentParam={ card:defineAsyncComponent(() => import('./a.vue')), phone:defineAsyncComponent(() => import('./b.vue')), message:defineAsyncComponent(() => import('./c.vue')) }
标签:异步,vue,const,defineAsyncComponent,引入,组件,import From: https://www.cnblogs.com/qianduan-lucky/p/17661419.html