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.

32 lines
993 B

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. // dayjs.locale('zh-cn')
  10. // import uploadFileToOSS from './upload.js'
  11. const plugins = {
  12. install(app) {
  13. // app.config.globalProperties.uploadFileToOSS = uploadFileToOSS
  14. // app.config.globalProperties.dayjs = dayjs
  15. app.config.globalProperties.$api = api
  16. app.config.globalProperties.$http = http.http
  17. app.config.globalProperties.$httpGet = http.get
  18. app.config.globalProperties.$httpPost = http.post
  19. app.config.globalProperties.$httpDelete = http.delete
  20. app.config.globalProperties.$httpSync = http.syncHttp
  21. app.config.globalProperties.$upload = oss.upload
  22. app.config.globalProperties.$timeUtils = time
  23. app.config.globalProperties.$utils = util
  24. app.config.globalProperties.$storage = storage
  25. }
  26. }
  27. export default plugins;