vue-vben-admin/src/components/registerGlobComp.ts

17 lines
360 B
TypeScript
Raw Normal View History

2020-09-28 20:19:10 +08:00
import Icon from './Icon/index';
2020-11-26 21:19:39 +08:00
import { Button } from './Button';
import {
// Need
Button as AntButton,
} from 'ant-design-vue';
2021-01-10 21:23:21 +08:00
2021-01-09 23:28:52 +08:00
import { App } from 'vue';
2020-09-28 20:19:10 +08:00
const compList = [Icon, Button, AntButton.Group];
2021-01-09 23:28:52 +08:00
export function registerGlobComp(app: App) {
2020-09-28 20:19:10 +08:00
compList.forEach((comp: any) => {
2021-02-22 00:01:03 +08:00
app.component(comp.name || comp.displayName, comp);
2020-09-28 20:19:10 +08:00
});
}