升级ui vue3版本

This commit is contained in:
吕金泽
2022-03-05 10:42:10 +08:00
parent 4b2134065e
commit 8b8095b91a
367 changed files with 135973 additions and 0 deletions
@@ -0,0 +1,30 @@
import * as PlusIcons from '@element-plus/icons-vue'
import VueUeditorWrap from 'vue-ueditor-wrap'
import request from './request'
import global from './global'
import common from './common'
import treeTable from './treeTable'
const install = (app) => {
app.config.globalProperties.$request = request
app.config.globalProperties.$post = (url, data) => request.post(url, data, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
transformRequest: [data => Object.keys(data).map(it => encodeURIComponent(it) + '=' + encodeURIComponent(data[it] === null || data[it] === undefined ? '' : data[it])).join('&')]
})
app.config.globalProperties.$postJson = (url, data) => request.post(url, JSON.stringify(data), {
headers: {
'Content-Type': 'application/json'
}
})
app.config.globalProperties.$get = (url, data) => request({ url, params: data })
app.config.globalProperties.$global = global
app.config.globalProperties.$common = common
app.config.globalProperties.$treeTable = treeTable
for(var key in PlusIcons) {
app.component(`El${key}`, PlusIcons[key])
}
app.use(VueUeditorWrap)
}
export default install