From 54adf344a0262db5c7933bfa916323d45e2793c9 Mon Sep 17 00:00:00 2001 From: zhanghan2021 Date: Mon, 13 Nov 2023 17:34:25 +0800 Subject: [PATCH] Set language to zhCn --- frontend/package.json | 2 +- frontend/src/App.vue | 16 ++++++++++------ frontend/vite.config.ts | 23 ++++++++++++----------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index b952378..15c4199 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "run-p type-check \"build-only {@}\" --", "preview": "vite preview", "build-only": "vite build", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c41f846..d2234c3 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,9 +1,13 @@ - - - + + + diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index c65b5be..42cd4bf 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,19 +1,20 @@ -import { fileURLToPath, URL } from 'node:url' +import { fileURLToPath, URL } from 'node:url'; -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - vue(), - ], + plugins: [vue()], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, }, server: { + port: 8080, + https: false, + cors: true, proxy: { '/api/v1': { target: 'http://localhost:8888', @@ -21,6 +22,6 @@ export default defineConfig({ changeOrigin: true, // 如果接口跨域,需要进行这个参数配置 // rewrite: path => path.replace(/^\/demo/, '/demo') }, - } - } -}) + }, + }, +}); -- Gitee