12345678910111213141516171819 |
- import type { App } from 'vue';
- import { components } from './components';
- export * from './components';
- export const install = function (app: App) {
- Object.keys(components).forEach((key) => {
- const component = components[key as keyof typeof components];
- if (component?.install) {
- console.log('注册组件:', key);
- app.use(component as any);
- }
- });
-
- return app;
- };
- export default {
- version: '1.0.0',
- install,
- };
|