registerThirdComp.ts 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import type { App } from 'vue';
  2. // import { registerJVxeTable } from '/@/components/jeecg/JVxeTable';
  3. // import { registerJVxeCustom } from '/@/components/JVxeCustom';
  4. // 注册全局聊天表情包
  5. import { Picker } from 'emoji-mart-vue-fast/src';
  6. // 注册全局dayjs
  7. import dayjs from 'dayjs';
  8. import relativeTime from 'dayjs/plugin/relativeTime';
  9. import customParseFormat from 'dayjs/plugin/customParseFormat';
  10. export async function registerThirdComp(app: App) {
  11. //---------------------------------------------------------------------
  12. // // 注册 JVxeTable 组件
  13. // registerJVxeTable(app);
  14. // // 注册 JVxeTable 自定义组件
  15. // await registerJVxeCustom();
  16. //---------------------------------------------------------------------
  17. // 注册全局聊天表情包
  18. app.component('Picker', Picker);
  19. //---------------------------------------------------------------------
  20. // 注册全局dayjs
  21. dayjs.locale('zh-cn');
  22. dayjs.extend(relativeTime);
  23. dayjs.extend(customParseFormat);
  24. app.config.globalProperties.$dayjs = dayjs;
  25. app.provide('$dayjs', dayjs);
  26. //---------------------------------------------------------------------
  27. }