修复了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的场景(如步长、范围等)。 |
||
|---|---|---|
| .. | ||
| docs | ||
| public | ||
| scripts | ||
| src | ||
| src-tauri | ||
| test_data | ||
| .gitignore | ||
| AI_CLASSIFICATION_STATS_FIX.md | ||
| BOWONG_TEXT_VIDEO_AGENT_IMPLEMENTATION.md | ||
| CHANGELOG.md | ||
| DATABASE_OPTIMIZATION_GUIDE.md | ||
| FEATURE_MATERIAL_TYPE_DISPLAY.md | ||
| OUTFIT_PHOTO_GENERATION_IMPLEMENTATION.md | ||
| README.md | ||
| TOOLS_FEATURE.md | ||
| index.html | ||
| package.json | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| test_parallel_processing.md | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
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 等)