From a0ad692ad8acef63c1221c7056201721d7d3592b Mon Sep 17 00:00:00 2001 From: fofolee Date: Sun, 5 Jul 2020 10:54:58 +0800 Subject: [PATCH] =?UTF-8?q?pwd=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=B6=E8=BF=94=E5=9B=9E=E6=A1=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/assets/index.js b/src/assets/index.js index 309925e..64549b1 100644 --- a/src/assets/index.js +++ b/src/assets/index.js @@ -19,11 +19,9 @@ putDB('history', { cmd: cmd, program: program, scptarg: scptarg, customoptions: customoptions }, 'codeHistory') } // 初始化 - $("#options").empty() - $("#out").empty() - $("[id^=quick").remove() + $("#options, #out").empty() + $('body').children(':not(#wrapper)').remove() $('body').css({overflow: 'hidden'}) - swal.close() if (handleEnter) document.removeEventListener('keydown', handleEnter) }) // 配置页面 @@ -65,7 +63,7 @@ } // 获取资源管理器或访达当前目录 if (cmd.includes('{{pwd}}')) { - let repl = utools.getCurrentFolderPath().replace(/\\/g, '\\\\'); + let repl = getCurrentFolderPathFix(); cmd = cmd.replace(/\{\{pwd\}\}/mg, repl) } // 获取窗口信息 @@ -128,7 +126,7 @@ let switchQuickCommandResult = (stdout, stderr, outputOpts) => { var output = outputOpts.type, autoScroll = outputOpts.autoScroll, autoHeight = outputOpts.autoHeight; var outputAutoFix = (autoScroll, autoHeight) => { - var outputHeight = $("#out").height() + 20 + var outputHeight = $("#out").outerHeight() if (outputHeight > 600) outputHeight = 600 if (autoHeight && $('#options').is(':hidden')) utools.setExpendHeight(outputHeight); if (outputHeight == 600 && autoScroll) $(document).scrollTop($(document).height());