1234567891011121314151617181920212223242526 |
- import { App, Component } from 'vue'
- import EasyMapComponent from '@/components/easyMap/index.vue'
- import EasyMapGLComponent from '@/components/easyMapGL/index.vue'
- interface FileType {
- [key: string]: Component
- }
- const Components: Record<string, FileType> = import.meta.globEager("/src/components/**/*.vue")
- export default (app: App): void => {
-
- Object.keys(Components).forEach((c: string) => {
-
- const component = Components[c] ? Components[c].default : null
-
- if (component && component.name) {
-
- app.component(component.name as string, component)
- }
- })
- app.component('EasyMapComponent', EasyMapComponent)
- app.component('EasyMapGLComponent', EasyMapGLComponent)
- }
|