You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.0 KiB

8 months ago
  1. import http from './http.js'
  2. import util from './utils.js'
  3. import time from './timeUtils.js'
  4. import storage from './storage.js'
  5. import oss from './oss.js'
  6. import api from './api.js'
  7. import 'dayjs/locale/zh-cn'
  8. import dayjs from 'dayjs'
  9. import comfirm from './confirm.js'
  10. dayjs.locale('zh-cn')
  11. import uploadFileToOSS from './upload.js'
  12. const plugins = {
  13. install(app) {
  14. app.config.globalProperties.uploadFileToOSS = uploadFileToOSS
  15. app.config.globalProperties.dayjs = dayjs
  16. app.config.globalProperties.$api = api
  17. app.config.globalProperties.$http = http.http
  18. app.config.globalProperties.$httpGet = http.get
  19. app.config.globalProperties.$httpPost = http.post
  20. app.config.globalProperties.$httpDelete = http.delete
  21. app.config.globalProperties.$httpSync = http.syncHttp
  22. app.config.globalProperties.$upload = oss.upload
  23. app.config.globalProperties.$timeUtils = time
  24. app.config.globalProperties.$utils = util
  25. app.config.globalProperties.$storage = storage
  26. app.config.globalProperties.$comfirm = comfirm.showConfirm
  27. }
  28. }
  29. export default plugins;