// 动态引入 template 目录下的所有 .vue 文件
const templates = import.meta.glob('./*.vue', { eager: true });

const components = [];

// 遍历所有引入的文件
for (const path in templates) {
  const component = templates[path].default;
  components.push(component);
}
const registerComponents = (app) => {
  components.forEach((component) => {
    app.component(component.name, component);
  })
} 
export { components, registerComponents };

