main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { createApp } from "vue";
  2. import App from "./App.vue";
  3. import router from "./router";
  4. import i18n from "@/lang/";
  5. import { moneyFormat, getDictOne, compareTime, dictValueLabel, formChange, formChangeTwo } from "@/utils/util";
  6. const app = createApp(App);
  7. app.use(router);
  8. app.use(i18n).mount("#app");
  9. import { uploadDdRightBtn } from "@/utils/ddAdapter";
  10. import { post, get } from "@/utils/axios";
  11. import store from './store'
  12. app.config.globalProperties.get = get;
  13. app.config.globalProperties.post = post;
  14. // 金额千分符
  15. app.config.globalProperties.moneyFormat = moneyFormat;
  16. // 获取字典
  17. app.config.globalProperties.getDictOne = getDictOne;
  18. // 字典回显
  19. app.config.globalProperties.dictValueLabel = dictValueLabel;
  20. // 比较时间大小
  21. app.config.globalProperties.compareTime = compareTime;
  22. app.config.globalProperties.uploadDdRightBtn = uploadDdRightBtn;
  23. // form组件 select change事件回填
  24. app.config.globalProperties.formChange = formChange;
  25. app.config.globalProperties.formChangeTwo = formChangeTwo;
  26. //pinia
  27. app.use(store);
  28. //中英文全局挂载
  29. app.config.globalProperties.t = i18n.global.t;
  30. export default app;