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

19 lines
389 B
TypeScript
Raw Normal View History

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