feat: 功能优化

This commit is contained in:
2026-01-17 14:43:42 +08:00
parent 5ed0cfff07
commit fecd47e25d
60 changed files with 3529 additions and 827 deletions

View File

@@ -30,28 +30,7 @@ export default defineConfig(({ mode }) => {
UnoCSS(),
vueDevTools(),
tailwindcss()
// electron({
// main: {
// // Shortcut of `build.lib.entry`.
// entry: 'electron/main.ts',
// vite: {
// build: {
// rollupOptions: {
// external: ['better-sqlite3'],
// },
// },
// },
// },
// preload: {
// input: fileURLToPath(new URL('./electron/preload.ts', import.meta.url)),
// },
// // See 👉 https://github.com/electron-vite/vite-plugin-electron-renderer
// renderer:
// process.env.NODE_ENV === 'test'
// ? // https://github.com/electron-vite/vite-plugin-electron-renderer/issues/78#issuecomment-2053600808
// undefined
// : {},
// }),
],
resolve: {
alias: {
@@ -82,6 +61,17 @@ export default defineConfig(({ mode }) => {
})
},
},
// OSS 代理 - 用于直传上传
'/oss': {
target: 'https://muye-ai-chat.oss-cn-hangzhou.aliyuncs.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/oss/, ''),
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': '*',
},
},
},
},
}