mixvideo-v2/apps/desktop
root 637c4e036f fix: 修复参数配置中数值为0时无法正确显示的问题
修复了ComfyUI V2工作流模板参数配置中的关键bug:

🐛 问题描述:
- 当数值参数(最小值、最大值、步长、默认值等)设置为0时,由于JavaScript的falsy值特性,使用 || 操作符会导致显示空字符串而不是0

🔧 修复内容:
-  最小值字段:schema.min || '' → schema.min !== undefined ? schema.min : ''
-  最大值字段:schema.max || '' → schema.max !== undefined ? schema.max : ''
-  步长字段:schema.step || '' → schema.step !== undefined ? schema.step : ''
-  默认值字段(数字类型):schema.default || '' → schema.default !== undefined ? schema.default : ''
-  宽度字段:schema.width || '' → schema.width !== undefined ? schema.width : ''
-  高度字段:schema.height || '' → schema.height !== undefined ? schema.height : ''
-  时长字段:schema.duration || '' → schema.duration !== undefined ? schema.duration : ''
-  文件大小字段:schema.maxSize ? Math.round(...) → schema.maxSize !== undefined ? Math.round(...) : ''

💡 技术细节:
- 使用 !== undefined 检查而不是 || 操作符,确保0值能正确显示
- 保持字符串字段使用 || '' 的逻辑,因为空字符串是合理的默认值
- 确保所有数值类型字段都能正确处理0值

🎯 影响范围:
- 整数类型参数的最小值、最大值、步长配置
- 浮点数类型参数的数值范围设置
- 媒体类型参数的尺寸和大小限制
- 所有数值类型的默认值设置

这个修复确保了用户可以正确设置0作为参数值,
特别重要的是最小值为0的场景(如步长、范围等)。
2025-08-08 22:38:01 +08:00
..
docs feat: 实现穿搭照片生成功能 2025-07-30 17:28:31 +08:00
public Initial commit: MixVideo Desktop v0.1.0 2025-07-13 17:57:52 +08:00
scripts feat: 实现项目-模板绑定和素材-模特绑定管理功能 2025-07-15 12:50:30 +08:00
src fix: 修复参数配置中数值为0时无法正确显示的问题 2025-08-08 22:38:01 +08:00
src-tauri fix(comfyui): 修复ComfyUI V2连接状态管理问题 2025-08-08 20:17:53 +08:00
test_data feat: 添加便捷小工具页面 - AI检索图片/数据清洗功能 2025-07-17 15:29:59 +08:00
.gitignore Initial commit: MixVideo Desktop v0.1.0 2025-07-13 17:57:52 +08:00
AI_CLASSIFICATION_STATS_FIX.md fix: 修复AI分类统计数值溢出问题 2025-07-18 14:27:25 +08:00
BOWONG_TEXT_VIDEO_AGENT_IMPLEMENTATION.md fix: 修复 AppState 中缺失的 bowong_text_video_agent_service 字段 2025-08-01 10:43:16 +08:00
CHANGELOG.md chore: 发布 v0.1.3 补丁版本 2025-07-13 23:09:57 +08:00
DATABASE_OPTIMIZATION_GUIDE.md fix: 数据库链接 锁问题 2025-07-15 18:10:54 +08:00
FEATURE_MATERIAL_TYPE_DISPLAY.md feat: 实现素材类型区分展示功能 2025-07-18 14:20:57 +08:00
OUTFIT_PHOTO_GENERATION_IMPLEMENTATION.md feat: 实现穿搭照片生成功能 2025-07-30 17:28:31 +08:00
README.md Initial commit: MixVideo Desktop v0.1.0 2025-07-13 17:57:52 +08:00
TOOLS_FEATURE.md feat: 添加便捷小工具页面 - AI检索图片/数据清洗功能 2025-07-17 15:29:59 +08:00
index.html Initial commit: MixVideo Desktop v0.1.0 2025-07-13 17:57:52 +08:00
package.json feat: 创建符合ComfyUI SDK规范的工作流模板创建器 2025-08-08 22:12:02 +08:00
postcss.config.js feat: 实现项目管理功能 v0.1.1 2025-07-13 18:46:58 +08:00
tailwind.config.js feat: UI美化和UX改进 v0.1.5 2025-07-14 00:23:58 +08:00
test_parallel_processing.md feat: 实现AI视频分类10个并发任务同时运行 2025-07-18 11:32:24 +08:00
tsconfig.json fix: 修复前端构建报错 2025-08-07 17:13:28 +08:00
tsconfig.node.json Initial commit: MixVideo Desktop v0.1.0 2025-07-13 17:57:52 +08:00
vite.config.ts feat: 实现模特详情页视频生成功能 2025-07-16 19:39:44 +08:00
vitest.config.ts feat: 实现项目-模板绑定和素材-模特绑定管理功能 2025-07-15 12:50:30 +08:00

README.md

@mixvideo/desktop

MixVideo 桌面应用 - 基于 Tauri + React + TypeScript 构建的跨平台桌面应用。

🚀 快速开始

开发环境要求

  • Node.js 18+
  • Rust 1.70+
  • PNPM 8+

安装依赖

pnpm install

开发模式

pnpm dev
# 或
pnpm tauri:dev

构建应用

pnpm tauri:build

📁 项目结构

apps/desktop/
├── src/                    # React 前端源码
│   ├── components/         # React 组件
│   ├── pages/             # 页面组件
│   ├── hooks/             # 自定义 Hooks
│   ├── services/          # API 服务
│   ├── types/             # TypeScript 类型
│   └── utils/             # 工具函数
├── src-tauri/             # Rust 后端源码
│   ├── src/               # Rust 源码
│   ├── Cargo.toml         # Rust 依赖配置
│   └── tauri.conf.json    # Tauri 配置
├── public/                # 静态资源
└── package.json           # 前端依赖配置

🛠️ 技术栈

  • 前端: React 18 + TypeScript + Vite
  • 后端: Rust + Tauri 2.0
  • UI: 待定 (可选择 Ant Design、Material-UI 等)
  • 状态管理: 待定 (可选择 Zustand、Redux Toolkit 等)

📝 开发指南

推荐 IDE 设置