dialog.showSaveDialog({
defaultPath: path.join(folderPath, "默认文件名.mp4"),
properties: [
"openDirectory",
"createDirectory",
"showHiddenFiles",
"dontAddToRecent",
],
})
看源码
showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions): Promise<Electron.SaveDialogReturnValue>;
继续看源码
interface SaveDialogOptions {
/**
* The dialog title. Cannot be displayed on some _Linux_ desktop environments.
*/
title?: string;
/**
* Absolute directory path, absolute file path, or file name to use by default. //默认情况下将使用的绝对目录路径、绝对文件路径或文件名。
*/
defaultPath?: string;
}