1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import {
- createApp
- } from "vue";
- import App from "./App.vue";
- import router from "./router";
- import i18n from "@/lang/";
- import {
- moneyFormat,
- getDictOne,
- compareTime,
- dictValueLabel,
- dictKeyValue,
- formChange,
- formChangeTwo,
- deepClone,
- getFile,
- onPreviewFile
- } from "@/utils/util";
- import {
- handleTree
- } from "@/utils/ruoyi";
- // 全局文件上传地址
- let prefix =
- window.location.protocol.indexOf("https") >= 0 ? "https://" : "http://";
- const uploadUrl =
- prefix +
- process.env.VUE_APP_UPLOAD_API +
- process.env.VUE_APP_UPLOAD_BASE_API + '/open/fileInfo/upload'
- const app = createApp(App);
- app.use(router);
- app.use(i18n).mount("#app");
- import {
- uploadDdRightBtn
- } from "@/utils/ddAdapter";
- import {
- post,
- get
- } from "@/utils/axios";
- import store from './store'
- app.config.globalProperties.get = get;
- app.config.globalProperties.post = post;
- // 金额千分符
- app.config.globalProperties.moneyFormat = moneyFormat;
- // 获取字典
- app.config.globalProperties.getDictOne = getDictOne;
- // 字典回显
- app.config.globalProperties.dictValueLabel = dictValueLabel;
- app.config.globalProperties.dictKeyValue = dictKeyValue;
- // 比较时间大小
- app.config.globalProperties.compareTime = compareTime;
- app.config.globalProperties.uploadDdRightBtn = uploadDdRightBtn;
- // form组件 select change事件回填
- app.config.globalProperties.formChange = formChange;
- app.config.globalProperties.formChangeTwo = formChangeTwo;
- // 深拷贝
- app.config.globalProperties.deepClone = deepClone;
- app.config.globalProperties.handleTree = handleTree;
- app.config.globalProperties.getFile = getFile;
- app.config.globalProperties.onPreviewFile = onPreviewFile;
- app.config.globalProperties.uploadUrl = uploadUrl;
- //pinia
- app.use(store);
- //中英文全局挂载
- app.config.globalProperties.t = i18n.global.t;
- export default app;
|