mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-23 20:44:42 +08:00
用户交互新增选择对话框,VarInput支持多选,新增CheckGroup组件
This commit is contained in:
@@ -6,6 +6,7 @@ const quickcomposer = {
|
||||
network: require("./quickcomposer/network"),
|
||||
coding: require("./quickcomposer/coding"),
|
||||
math: require("./quickcomposer/math"),
|
||||
ui: require("./quickcomposer/ui"),
|
||||
};
|
||||
|
||||
module.exports = quickcomposer;
|
||||
|
50
plugin/lib/quickcomposer/ui/dialog.js
Normal file
50
plugin/lib/quickcomposer/ui/dialog.js
Normal file
@@ -0,0 +1,50 @@
|
||||
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,
|
||||
};
|
6
plugin/lib/quickcomposer/ui/index.js
Normal file
6
plugin/lib/quickcomposer/ui/index.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const { showSaveDialog, showOpenDialog } = require("./dialog");
|
||||
|
||||
module.exports = {
|
||||
showSaveDialog,
|
||||
showOpenDialog,
|
||||
};
|
Reference in New Issue
Block a user