From 580dc8be525d5366b4c4da74c560ef875c29bd24 Mon Sep 17 00:00:00 2001 From: ROOG Date: Sat, 21 Mar 2026 01:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=AE=BD=E8=81=8A=E5=A4=A9=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=B9=B6=E6=96=B0=E5=A2=9E=E4=B8=80=E9=94=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 聊天面板宽度从380px调整为480px,提升阅读体验 - 新增 start.bat 一键启动脚本,自动启动前后端并打开浏览器 Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/chat/ChatPanel.vue | 2 +- start.bat | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 start.bat diff --git a/frontend/src/components/chat/ChatPanel.vue b/frontend/src/components/chat/ChatPanel.vue index fef3aef..bfec2de 100644 --- a/frontend/src/components/chat/ChatPanel.vue +++ b/frontend/src/components/chat/ChatPanel.vue @@ -198,7 +198,7 @@ onMounted(() => { /* 面板 */ .chat-panel { - width: 380px; + width: 480px; max-width: 100vw; height: 100vh; background: var(--paper-50); diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..8d1ead7 --- /dev/null +++ b/start.bat @@ -0,0 +1,49 @@ +@echo off +chcp 65001 >nul +title Noval - 小说创作应用 + +echo ======================================== +echo Noval 启动中... +echo ======================================== +echo. + +:: 检查后端虚拟环境 +if not exist "backend\.venv\Scripts\uvicorn.exe" ( + echo [!] 未检测到后端虚拟环境,正在初始化... + cd backend + py -3 -m venv .venv + .venv\Scripts\pip install -r requirements.txt + cd .. + echo. +) + +:: 检查前端依赖 +if not exist "frontend\node_modules" ( + echo [!] 未检测到前端依赖,正在安装... + cd frontend + call npm install + cd .. + echo. +) + +echo [1/2] 启动后端 (port 8000)... +start "Noval-Backend" cmd /c "cd backend && .venv\Scripts\uvicorn app.main:app --port 8000" + +echo [2/2] 启动前端 (port 5173)... +start "Noval-Frontend" cmd /c "cd frontend && npm run dev" + +:: 等待服务就绪后打开浏览器 +timeout /t 3 /nobreak >nul +start http://localhost:5173 + +echo. +echo ======================================== +echo Noval 已启动! +echo 前端: http://localhost:5173 +echo 后端: http://localhost:8000/docs +echo ======================================== +echo 关闭此窗口不会停止服务 +echo 如需停止,请关闭 Noval-Backend 和 +echo Noval-Frontend 两个终端窗口 +echo ======================================== +pause