近期将我的游戏存档管理器迁移到 Tauri2 出现点问题,想起来以前 V1 的时候也遇到过这个问题,故记录下来。
具体问题就是在前端一个可拖拽组件没有办法被拖动,处理方式很简单,直接修改src-tauri/tauri.conf.json
文件,将dragDropEnabled
设为false
,作为参考,请看:
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "game-save-manager",
"identifier": "com.game-save-manager",
"build": {
"frontendDist": "../dist",
"devUrl": "http://localhost:3000",
"beforeDevCommand": "pnpm web:dev",
"beforeBuildCommand": "pnpm web:generate"
},
"app": {
"windows": [
{
"title": "Game Save Manager",
"width": 1280,
"height": 720,
"resizable": true,
"fullscreen": false,
"dragDropEnabled": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
]
}
}