|
import http from './http.js'
|
|
import util from './utils.js'
|
|
import time from './timeUtils.js'
|
|
import storage from './storage.js'
|
|
import oss from './oss.js'
|
|
import api from './api.js'
|
|
import 'dayjs/locale/zh-cn'
|
|
import dayjs from 'dayjs'
|
|
import comfirm from './confirm.js'
|
|
|
|
dayjs.locale('zh-cn')
|
|
|
|
import uploadFileToOSS from './upload.js'
|
|
|
|
const plugins = {
|
|
install(app) {
|
|
app.config.globalProperties.uploadFileToOSS = uploadFileToOSS
|
|
app.config.globalProperties.dayjs = dayjs
|
|
app.config.globalProperties.$api = api
|
|
app.config.globalProperties.$http = http.http
|
|
app.config.globalProperties.$httpGet = http.get
|
|
app.config.globalProperties.$httpPost = http.post
|
|
app.config.globalProperties.$httpDelete = http.delete
|
|
app.config.globalProperties.$httpSync = http.syncHttp
|
|
|
|
app.config.globalProperties.$upload = oss.upload
|
|
|
|
app.config.globalProperties.$timeUtils = time
|
|
app.config.globalProperties.$utils = util
|
|
app.config.globalProperties.$storage = storage
|
|
app.config.globalProperties.$comfirm = comfirm.showConfirm
|
|
}
|
|
}
|
|
|
|
export default plugins;
|