mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 15:04:06 +08:00
51 lines
690 B
JavaScript
51 lines
690 B
JavaScript
const showSaveDialog = (
|
|
title,
|
|
defaultPath,
|
|
buttonLabel,
|
|
message,
|
|
extensions,
|
|
properties
|
|
) => {
|
|
return window.utools.showSaveDialog({
|
|
title,
|
|
defaultPath,
|
|
buttonLabel,
|
|
message,
|
|
properties,
|
|
filters: [
|
|
{
|
|
name: "文件",
|
|
extensions,
|
|
},
|
|
],
|
|
});
|
|
};
|
|
|
|
const showOpenDialog = (
|
|
title,
|
|
defaultPath,
|
|
buttonLabel,
|
|
message,
|
|
extensions,
|
|
properties
|
|
) => {
|
|
return window.utools.showOpenDialog({
|
|
title,
|
|
defaultPath,
|
|
buttonLabel,
|
|
message,
|
|
properties,
|
|
filters: [
|
|
{
|
|
name: "文件",
|
|
extensions,
|
|
},
|
|
],
|
|
});
|
|
};
|
|
|
|
module.exports = {
|
|
showSaveDialog,
|
|
showOpenDialog,
|
|
};
|