feature:url调整让上传文件支持/模式

This commit is contained in:
pixelMax(奇淼
2024-06-28 11:37:59 +08:00
parent 737c051466
commit 24e4d05157
5 changed files with 16 additions and 6 deletions
+8
View File
@@ -1,5 +1,6 @@
import { formatTimeToStr } from '@/utils/date'
import { getDict } from '@/utils/dictionary'
import {ref} from "vue";
export const formatBoolean = (bool) => {
if (bool !== null) {
@@ -115,3 +116,10 @@ export const setBodyPrimaryColor = ( primaryColor, darkMode ) =>{
}
document.documentElement.style.setProperty(`--el-menu-hover-bg-color`, addOpacityToColor(primaryColor, 0.2))
}
const baseUrl = ref(import.meta.env.VITE_BASE_API)
export const getBaseUrl = () => {
return baseUrl.value === "/" ? "" : baseUrl.value + "/"
}