Currently, I am getting acquainted with the tauri framework by working on a small desktop application. While testing various tauri JS API modules, most of them have been functioning as expected except for the dialog
and notification
modules. Whenever I test any function from the dialog
module, such as open
, the promise resolves immediately with a null
value, and there seems to be no visible activity on the tauri side (like when the open
function should trigger a file dialog). I haven't made any modifications to the generated Rust files and my frontend utilizes VueJS SPA which is running in a 64-bit Windows 10 environment. Additionally, the permissions in the tauri.conf.json
file are correctly set for using these modules.
Here is the code snippet where I invoke the dialog.open
function:
import { Options, Vue } from "vue-class-component";
import { open as openDialog } from "@tauri-apps/api/dialog";
@Options({
components: {
... some vue components ...
},
})
export default class Freeze extends Vue {
selectedFilepaths: string[] = [];
async selectFile(){
const pathName: string = await openDialog({
defaultPath: ".",
multiple: false
}) as string;
this.selectedFilepaths.push(pathName);
}
}
Any assistance on this matter would be greatly appreciated :)