perf: 模板优化

This commit is contained in:
刘引
2025-12-27 14:27:33 +08:00
parent 99e1c9b445
commit 7e6921c8df
16 changed files with 617 additions and 61 deletions

View File

@@ -26,8 +26,8 @@ export default defineConfig({
globPatterns: ['**/*.{js,css,html,svg,jpg,ico}']
},
manifest: {
name: 'vue模板',
short_name: 'vue模板',
name: 'Excel处理工具',
short_name: '处理工具',
theme_color: '#fff', // 浏览器状态栏主题
start_url: './',
display: 'standalone',
@@ -39,7 +39,6 @@ export default defineConfig({
type: 'image/png',
purpose: 'any'
},
{
src: 'logo.png',
sizes: '512x512',
@@ -67,17 +66,13 @@ export default defineConfig({
open: true,
proxy: {
'/api': {
// 7566
// target: 'http://192.168.39.120:7566',
target: 'http://127.0.0.1:8066',
target: 'http://10.2.0.32:5000',
changeOrigin: true,
rewrite: p => p.replace(/^\/api/, ''),
bypass: (req, res, options) => {
// @ts-ignore
const proxyURL = options.target + options.rewrite(req.url)
// console.log('proxyURL', proxyURL)
req.headers['x-req-proxyURL'] = proxyURL // 设置未生效
// @ts-ignore
res.setHeader('x-req-proxyURL', proxyURL) // 设置响应头可以看到
}
}