add batch script
This commit is contained in:
1 parent
0f050a068b
commit
7994e9c515
6 files changed
+106
-9
No files matched your search
+18
-4
@@ -344,10 +344,6 @@ export default class AppMenu {
|
||||
return new MenuItem({
|
||||
label: "开发工具",
|
||||
submenu: [
|
||||
{
|
||||
label: "联调服务器",
|
||||
submenu: serverItems,
|
||||
},
|
||||
{
|
||||
label: "热更",
|
||||
accelerator: "Ctrl+R",
|
||||
@@ -355,6 +351,24 @@ export default class AppMenu {
|
||||
this.webContents.send(MainEventType.RELOAD_SERVER);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "联调服务器",
|
||||
submenu: serverItems,
|
||||
},
|
||||
{
|
||||
label: "处理脚本",
|
||||
click: () => {
|
||||
(async () => {
|
||||
const res = await dialog.showOpenDialog({
|
||||
properties: ["openFile"],
|
||||
filters: [{ name: "Javascript", extensions: ["js"] }],
|
||||
});
|
||||
if (res.filePaths.length > 0) {
|
||||
this.webContents.send(MainEventType.BATCH_EXEC, res.filePaths[0]);
|
||||
}
|
||||
})();
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user