You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
626 B

4 months ago
import type { App, Plugin } from 'vue';
import { isFunction } from 'lodash-es';
import * as commonComponents from '/nerv-lib/component'; // 基础组件
import * as serviceComponents from './component'; // 业务基础组件
import * as serviceView from './view'; //业务组件
const components: Recordable<Plugin | any> = {
...commonComponents,
...serviceComponents,
...serviceView,
};
export function registerGlobalComponent(app: App) {
Object.keys(components).forEach((key) => {
const component = components[key];
if (component.install || isFunction(component)) {
app.use(component);
}
});
}