1. 系统设置中增加系统Logo设置项 2. 系统标题增加logo的显示,并可自动判断,是否上传logo,若上传则显示 3. 完善系统设置功能,支持上传图片,支持设置值为布尔值或列表 4. 增加上传和获取图片的接口 5. 完善nginx,支持图片的接口代理
32 lines
785 B
TypeScript
32 lines
785 B
TypeScript
import { defineConfig, loadEnv } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
const proxyTarget = env.VITE_DEV_PROXY_TARGET || "http://127.0.0.1:8000";
|
|
|
|
return {
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
port: Number(env.VITE_DEV_PORT || 5173),
|
|
proxy: {
|
|
"/api": {
|
|
target: proxyTarget,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
"/uploads": {
|
|
target: proxyTarget,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|