UNPKG

hc-web-log-mon

Version:

基于 JS 跨平台插件,为前端项目提供【 行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段

23 lines (19 loc) 515 B
import { App } from 'vue' interface ObjType { [propName: string]: object } interface filesType extends ObjType { default: { __name: string [key: string]: any } } // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const files: Record<string, filesType> = import.meta.globEager('./*.vue') export default (app: App) => { Object.keys(files).forEach(path => { const name = files[path].default.name app.component(name, files[path].default) }) }