docs(user-guide): 添加本地预览方式说明和启动脚本

解决 file:// 协议 CORS 限制问题:
- README 添加本地 HTTP 服务器启动说明
- 新增 start-server.bat 快捷启动脚本
This commit is contained in:
2026-04-20 02:28:51 +08:00
parent d05a6cd529
commit 0b26d3d331
2 changed files with 32 additions and 0 deletions
+19
View File
@@ -261,6 +261,25 @@
- [演示h5_v1.html](演示h5_v1.html)
- [演示h5_v2_iPhone16竖屏比例.html](演示h5_v2_iPhone16竖屏比例.html)
### 本地预览方式
由于浏览器安全限制(CORS 策略),直接双击打开 HTML 文件(`file://` 协议)会导致图片无法加载。
**推荐方式:启动本地 HTTP 服务器**
双击运行 `start-server.bat` 启动脚本,然后浏览器访问:
```
http://localhost:3000/user-guide/演示h5_v2_iPhone16竖屏比例.html
```
或命令行启动:
```bash
cd user-guide
npx serve -l 3000
```
---
阿尼坊团队