在入口文件main.ts
中,动态引入了组件,如下:
main.ts
import Vue from 'vue'
import importCommonComponents from '@/plugins/common'
importCommonComponents(Vue)
plugins/common
import commonComponents from '@/components/common/index.ts'
import {
VueConstructor } from 'vue'
export default function(Vue: VueConstructor) {
Object.