🔧 核心修复: - 按照 Tauri v2 官方文档重新实现窗口控制 - 添加正确的权限配置到 capabilities/default.json - 使用官方推荐的 toggleMaximize() API - 实现手动拖拽处理替代 data-tauri-drag-region 🛠️ 技术改进: - 权限配置:添加 core🪟* 权限 - API 更新:使用 window.toggleMaximize() 替代手动状态管理 - 拖拽功能:实现 startDragging() + 双击最大化 - 错误处理:完善异步操作的错误捕获 ✨ 功能特性: - ✅ 窗口拖拽:点击标题栏拖拽移动窗口 - ✅ 双击最大化:双击标题栏切换最大化状态 - ✅ 最小化按钮:正确调用 window.minimize() - ✅ 最大化按钮:使用 window.toggleMaximize() - ✅ 关闭按钮:安全关闭应用程序 📋 测试说明: - 在有 GUI 环境中运行 'pnpm tauri dev' 测试 - 验证所有窗口控制功能正常工作 - 确认拖拽和双击功能响应正确 参考:https://v2.tauri.app/learn/window-customization/
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
|
"productName": "MixVideo V2",
|
|
"version": "2.0.0",
|
|
"identifier": "com.mixvideo.app",
|
|
"build": {
|
|
"frontendDist": "../build",
|
|
"devUrl": "http://localhost:3000",
|
|
"beforeDevCommand": "pnpm dev",
|
|
"beforeBuildCommand": "pnpm build"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "MixVideo V2 - 视频混剪软件",
|
|
"width": 1400,
|
|
"height": 900,
|
|
"minWidth": 1200,
|
|
"minHeight": 700,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"decorations": false,
|
|
"transparent": false,
|
|
"center": true
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"category": "VideoUtility",
|
|
"shortDescription": "Professional video editing software",
|
|
"longDescription": "MixVideo V2 is a modern video editing software built with Tauri and Python, featuring professional editing tools, AI-assisted editing, and advanced audio processing capabilities."
|
|
}
|
|
}
|