Tauri 对话
2024-01-31 16:28 更新
用于打开和保存文件的本机系统对话框。
当 build.withGlobalTauri设置为 in 时,也可以访问此包。window.__TAURI__.dialogtauri.conf.jsontrue
必须将 API 添加到 tauri.allowlist.dialog 中:tauri.conf.json
{
"tauri": {
"allowlist": {
"dialog": {
"all": true, // enable all dialog APIs
"ask": true, // enable dialog ask API
"confirm": true, // enable dialog confirm API
"message": true, // enable dialog message API
"open": true, // enable file open API
"save": true // enable file save API
}
}
}
}建议仅将您使用的 API 列入许可列表,以获得最佳捆绑包大小和安全性。
以上内容是否对您有帮助:

免费 AI IDE


更多建议: