// 引入自定义组件
import MainHeader from "@/components/mainHeader/mainHeader.vue";
import MainBody from "@/components/mainBody/mainBody.vue";
import RouterEle from "@/components/routerEle/routerEle.vue";

import type { App, Component } from "vue";

const components: { [name: string]: Component } = {
  MainHeader,
  MainBody,
  RouterEle,
};

export default {
  install(app: App) {
    // 全局注册
    Object.keys(components).forEach((key: string) => {
      app.component(key, components[key]);
    });
  },
};
