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.
42 lines
1.1 KiB
42 lines
1.1 KiB
|
|
|
|
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> = {
|
|
...commonComponents,
|
|
...serviceComponents,
|
|
...serviceView,
|
|
};
|
|
|
|
export function registerGlobalComponent(app: App) {
|
|
// const list = [
|
|
// // 'NsApplication',
|
|
// 'NsViewAddForm',
|
|
// // 'NsViewConfig',
|
|
// // 'NsContent',
|
|
// 'NsViewDetail',
|
|
// 'NsViewForm',
|
|
// 'NsViewListTable',
|
|
// 'NsViewMenuManage',
|
|
// 'NsViewRoleType',
|
|
// 'NsViewRoleTypeAddOrEdit',
|
|
// 'NsViewSetRolePerson',
|
|
// 'NsViewUserAdd',
|
|
// 'NsViewUserDetail',
|
|
// 'NsViewUserEdit',
|
|
// 'NsViewUserList',
|
|
// ];
|
|
Object.keys(components).forEach((key) => {
|
|
const component = components[key];
|
|
if (component.install || isFunction(component)) {
|
|
//if (!list.includes(component.name)) {
|
|
app.use(component);
|
|
// }
|
|
}
|
|
});
|
|
}
|
|
|