index.ts 1.5 KB

123456789101112131415161718192021222324252627
  1. import { registerComponent, registerAsyncComponent } from '/@/components/jeecg/JVxeTable';
  2. import { JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
  3. import { DictSearchSpanCell, DictSearchInputCell } from './src/components/JVxeSelectDictSearchCell';
  4. export async function registerJVxeCustom() {
  5. // ----------------- ⚠ 注意事项 ⚠ -----------------
  6. // 当组件内包含 BasicModal 时,必须使用异步引入!
  7. // 否则将会导致 i18n 失效!
  8. // ----------------- ⚠ 注意事项 ⚠ -----------------
  9. // 注册【Popup】(普通封装方式)
  10. await registerAsyncComponent(JVxeTypes.popup, import('./src/components/JVxePopupCell.vue'));
  11. // 注册【字典搜索下拉】组件(高级封装方式)
  12. registerComponent(JVxeTypes.selectDictSearch, DictSearchInputCell, DictSearchSpanCell);
  13. // 注册【文件上传】组件
  14. await registerAsyncComponent(JVxeTypes.file, import('./src/components/JVxeFileCell.vue'));
  15. // 注册【图片上传】组件
  16. await registerAsyncComponent(JVxeTypes.image, import('./src/components/JVxeImageCell.vue'));
  17. // 注册【用户选择】组件
  18. await registerAsyncComponent(JVxeTypes.userSelect, import('./src/components/JVxeUserSelectCell.vue'));
  19. // 注册【部门选择】组件
  20. await registerAsyncComponent(JVxeTypes.departSelect, import('./src/components/JVxeDepartSelectCell.vue'));
  21. // 注册【省市区选择】组件
  22. await registerAsyncComponent(JVxeTypes.pca, import('./src/components/JVxePcaCell.vue'));
  23. }