import { App } from 'vue';
<%_ if (enableTranslation) { _%>
import { i18n } from '@/i18n/setupI18n';
<%_ } _%>
import VXETable from 'vxe-table';
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx';
import ExcelJS from 'exceljs';
import { VXETablePluginAntd } from './VxeTable';
import 'xe-utils';

export function registerGlobComp(app: App) {
<%_ if (enableTranslation) { _%>
  VXETable.setConfig({
    // 对组件内置的提示语进行国际化翻译
    i18n: (key, args) => {
      return i18n.global.t(key, args);
    },
  });
<%_ } _%>
  app.use(VXETable);
  VXETable.use(VXETablePluginAntd).use(VXETablePluginExportXLSX, { ExcelJS });
}
