main.js 693 B

12345678910111213141516171819202122232425262728
  1. // 引入模块
  2. import App from './App'
  3. import { createSSRApp } from 'vue'
  4. // 全局请求
  5. import http from './utils/request.js'
  6. // 精度计算
  7. import decimal from './utils/decimal.js'
  8. // 精度计算
  9. import checkAccess from './utils/checkaccess.js'
  10. //分享
  11. import share from './utils/share.js'
  12. export function createApp() {
  13. // 创建APP
  14. const app = createSSRApp(App)
  15. // 挂载全局属性
  16. app.config.globalProperties.$http = http
  17. // 挂载全局属性
  18. app.config.globalProperties.$decimal = decimal
  19. // 挂载全局属性
  20. app.config.globalProperties.$checkAccess = checkAccess
  21. // 全局注册组件
  22. // app.component()
  23. app.mixin(share);
  24. return {
  25. app
  26. }
  27. }