WebMusic/webapp/README-ELECTRON.md

45 lines
811 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Electron 打包说明
## 安装依赖
```bash
cd webapp
npm install
```
## 开发模式
### 1. 启动前端开发服务器
```bash
npm run dev
```
### 2. 启动 Electron新终端窗口
```bash
npm run electron:dev
```
## 打包为 Windows EXE
```bash
npm run electron:build:win
```
打包后的文件会在 `release` 目录下。
## 配置后端 API 地址
1. 在应用右上角点击 ⚙️ 设置按钮
2. 输入后端服务器的完整地址(例如:`http://192.168.1.100:7001`
3. 点击"保存设置"
4. 刷新页面以应用新设置
## 注意事项
- Electron 应用使用 `electron-store` 存储配置,配置文件保存在用户数据目录
- Web 版本使用 `localStorage` 存储配置
- 设置页面支持测试连接功能,可以验证后端服务器是否可访问