引用部分 conponent
<component :is="domComp[item.nodeType]"/>
import domComp from '../compontents/index'
indexjs文件
import { defineAsyncComponent } from "vue";
let comps = {};
const modules = import.meta.glob('./*.vue')
for (const path in modules) {
let cname = path.replace('./','').replace('.vue','')
// @ts-ignore
comps[cname] = defineAsyncComponent(modules[path])
}
export default comps