From 1f1cc2740ef598c8925edc0f66bf40113d2044a7 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期四, 27 二月 2025 14:54:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/main.js | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index b3b6719..5809760 100644 --- a/src/main.js +++ b/src/main.js @@ -26,6 +26,7 @@ selectDictLabels, handleTree, } from "@/utils/ruoyi"; +import { dictToValue } from "@/utils/index"; // 鍒嗛〉缁勪欢 import Pagination from "@/components/Pagination"; // 鑷畾涔夎〃鏍煎伐鍏风粍浠� @@ -47,6 +48,7 @@ // 瀛楀吀鏁版嵁缁勪欢 import DictData from "@/components/DictData"; import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟 +import { getToken } from "@/utils/auth"; // 鍏ㄥ眬鏂规硶鎸傝浇 Vue.prototype.getDicts = getDicts; @@ -58,11 +60,26 @@ Vue.prototype.selectDictLabels = selectDictLabels; Vue.prototype.download = download; Vue.prototype.handleTree = handleTree; +Vue.prototype.dictToValue = dictToValue; Vue.prototype.HaveJson = (val) => { return JSON.parse(JSON.stringify(val)); }; -Vue.prototype.javaApi = process.env.VUE_APP_BASE_API; +Vue.prototype.javaApi = process.env.VUE_APP_BASE_API + ? process.env.VUE_APP_BASE_API + : "http://192.168.1.36:8002"; Vue.prototype.checkPermi = checkPermi; +Vue.prototype.uploadHeader = { + Authorization: "Bearer " + getToken(), +}; +// 瑙e喅el-radio-group鍗曢�夋鑷韩鐨刡ug +Vue.directive('removeAriaHidden', { + bind(el, binding) { + let ariaEls = el.querySelectorAll('.el-radio__original'); + ariaEls.forEach((item) => { + item.removeAttribute('aria-hidden'); + }); + } +}) // 鍏ㄥ眬缁勪欢鎸傝浇 Vue.component("DictTag", DictTag); @@ -72,7 +89,7 @@ Vue.component("FileUpload", FileUpload); Vue.component("ImageUpload", ImageUpload); Vue.component("ImagePreview", ImagePreview); -Vue.component('barcode', VueBarcode) +Vue.component("barcode", VueBarcode); Vue.use(directive); Vue.use(plugins); -- Gitblit v1.9.3