Files
admin_core/demo-project/启动说明.md
张成 d941bec7d8 1
2025-10-09 07:03:01 +08:00

120 lines
2.3 KiB
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.
# Demo 项目启动说明
## ✅ 配置完成
Demo 项目已配置为使用打包好的框架 JS 文件。
## 🚀 启动步骤
### 1. 确保框架文件已复制
检查文件是否存在:
```
demo-project/src/libs/admin-framework.js
```
如果不存在,在项目根目录执行:
```powershell
Copy-Item "dist\admin-framework.js" "demo-project\src\libs\admin-framework.js" -Force
```
### 2. 启动开发服务器
**方法一:使用命令行**
```bash
cd demo-project
npm run dev
```
**方法二:使用 start.batWindows**
```bash
cd demo-project
start.bat
```
**方法三:使用 start.shLinux/Mac**
```bash
cd demo-project
./start.sh
```
### 3. 访问应用
打开浏览器访问:
- **开发环境**http://localhost:8080
- **测试账号**admin / admin123
## 📝 注意事项
1. **端口占用**
- 如果 8080 端口被占用webpack 会自动使用其他端口
- 查看终端输出的实际端口号
2. **首次启动**
- 首次启动可能需要较长时间编译
- 等待 "Compiled successfully" 消息
3. **热更新**
- 修改代码后会自动刷新浏览器
- 如果没有自动刷新,手动刷新页面
## 🔍 故障排查
### 问题:找不到 admin-framework.js
**错误信息**
```
Module not found: Error: Can't resolve './libs/admin-framework.js'
```
**解决方案**
```powershell
# 在项目根目录执行
Copy-Item "dist\admin-framework.js" "demo-project\src\libs\admin-framework.js" -Force
```
### 问题:端口被占用
**错误信息**
```
Error: listen EADDRINUSE: address already in use :::8080
```
**解决方案**
1. 关闭占用 8080 端口的程序
2. 或修改 `webpack.config.js` 中的端口配置
### 问题:编译错误
**解决方案**
1. 检查 `src/main.js` 的引用路径是否正确
2. 确保 `admin-framework.js` 文件完整
3. 删除 `node_modules` 重新安装:
```bash
rm -rf node_modules
npm install
```
## 📚 相关文档
- `使用打包框架说明.md` - 详细使用说明
- `框架更新完成.md` - 更新记录
- `README.md` - 项目说明
## 🎯 下一步
启动成功后:
1. 使用测试账号登录
2. 测试菜单导航功能
3. 测试系统管理功能
4. 查看浏览器控制台,确保没有错误
---
**当前状态**:✅ 就绪
**框架版本**1.0.0
**启动命令**`npm run dev`