执行命令时,插件高度为0,有输出再展开

This commit is contained in:
fofolee 2020-06-08 23:35:05 +08:00
parent 2652546c50
commit 32484d5d73

View File

@ -6,6 +6,7 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
$("#options").show(); $("#options").show();
showOptions(); showOptions();
} else { } else {
utools.setExpendHeight(0);
$("#options").hide(); $("#options").hide();
$("#out").show().text(''); $("#out").show().text('');
var db = utools.db.get('customFts').data[code], var db = utools.db.get('customFts').data[code],
@ -109,9 +110,11 @@ function runCmd(cmd, option, output) {
// 有输出 // 有输出
switch (output) { switch (output) {
case "text": case "text":
utools.setExpendHeight(600);
$("#out").text(stdout); $("#out").text(stdout);
break; break;
case "html": case "html":
utools.setExpendHeight(600);
$("#out").html(stdout); $("#out").html(stdout);
break; break;
case "clip": case "clip":