From c31ad00747a72874aa0106758c98d07572e3b411 Mon Sep 17 00:00:00 2001 From: fofolee Date: Tue, 11 Jun 2019 17:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=BF=BD=E7=95=A5=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=9B=B4=E6=8E=A5=E9=80=80=E5=87=BA=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/index.js b/assets/index.js index d0e92c6..09a52e5 100644 --- a/assets/index.js +++ b/assets/index.js @@ -16,6 +16,8 @@ utools.onPluginEnter(({ code, type, payload }) => { option = programs[db.program]; // 通过主输入框直接进入 if (type == 'over') cmd = cmd.replace(/\{\{input\}\}/mg, payload); + // 忽略输出直接退出插件 + if (db.output == "ignore") utools.outPlugin(); // 运行脚本 window.run(cmd, option, db.codec, (stdout, stderr) => { // 报错 @@ -27,9 +29,6 @@ utools.onPluginEnter(({ code, type, payload }) => { // 有输出 if (stdout) { switch (db.output) { - case "ignore": - utools.outPlugin(); - break; case "text": utools.showMainWindow(); utools.setExpendHeight(600);