From 03fd56d1a050b9ca6e795de15a4f48b50fe41aff Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 16 八月 2024 12:22:13 +0800
Subject: [PATCH] 修改流程卡打印样式
---
UI-Project/vite.config.js | 67 ++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/UI-Project/vite.config.js b/UI-Project/vite.config.js
index b0685b2..8fdf859 100644
--- a/UI-Project/vite.config.js
+++ b/UI-Project/vite.config.js
@@ -1,40 +1,61 @@
-import { fileURLToPath, URL } from 'node:url'
-
-import { defineConfig } from 'vite'
+import {fileURLToPath, URL} from 'node:url'
+import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
+import AutoImport from 'unplugin-auto-import/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
- ReactivityTransform()
+ ReactivityTransform(),
+ AutoImport({
+ imports: [
+ 'vue-i18n',
+ ],
+ dts: './auto-imports.d.ts',
+ eslintrc: {
+ enabled: false, // 閰嶇疆鏇存柊鏃朵复鏃惰涓簍rue,
+ },
+ }),
],
resolve: {
alias: {
+ 'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
- port: 801,//绔彛鍙�
- host: true,//ip鍦板潃 鎴� '0.0.0.0' 鎴� "loaclhost"
- open: false, //鍚姩鍚庢槸鍚﹁嚜鍔ㄦ墦寮�娴忚鍣�
- https: false, // 鏄惁寮�鍚� https
+ port: 801,
+ host: true,
+ open: false,
+ https: false,
proxy: {
- '^/api': {
- target: 'localhost:8080/mesModuleTools', //鐩爣婧愶紝鐩爣鏈嶅姟鍣紝鐪熷疄璇锋眰鍦板潃
- changeOrigin: true, //鏀寔璺ㄥ煙
- rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //閲嶅啓鐪熷疄璺緞,鏇挎崲/api
- // pathRewrite: {
- // '^/api': ''
- // }
- // rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //閲嶅啓鐪熷疄璺緞,鏇挎崲/api
- },
- '/api2': {
- target: 'localhost:8080/mesModuleTools',
+ '/api': {
+ target: 'http://127.0.0.1:88/',
changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api2/, "mesModuleTools"),
+ rewrite: (path) => path.replace(/^\/api/, '/'),
},
- }
- }
-})
+ // '/api2': {
+ // target: 'http://localhost:8085/mesModuleTools',
+ // changeOrigin: true,
+ // pathRewrite: {
+ // '^/api2': '',
+ // },
+ // },
+ },
+ },
+ configureServer: ({ middlewares }) => {
+ middlewares.use(
+ '/mesModuleTools',
+ createProxyMiddleware({
+ target: 'ws://localhost:8081',
+ ws: true,
+ changeOrigin: true,
+ pathRewrite: {
+ '^/mesModuleTools': '',
+ },
+ })
+ );
+ },
+});
--
Gitblit v1.8.0