import { App } from 'vue';
import {
  ElTree,
  ElSubMenu,
  ElMenu,
  ElMenuItem,
  ElDialog,
  ElForm,
  ElFormItem,
  ElInput,
  ElButton,
  ElIcon,
  ElScrollbar,
  ElTooltip
} from 'element-plus'; // 需要的就导入

const components = [
  ElTree,
  ElSubMenu,
  ElMenu,
  ElMenuItem,
  ElDialog,
  ElForm,
  ElFormItem,
  ElInput,
  ElButton,
  ElIcon,
  ElScrollbar,
  ElTooltip
];

export default function (app: App): void {
  for (const component of components) {
    app.component(component.name, component);
  }
}
