mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 13:03:30 +08:00
新增 {{py}} 和 {{js}} 两个特殊变量
This commit is contained in:
@@ -119,7 +119,7 @@ export default {
|
||||
assignSpecialVars(cmd) {
|
||||
let spVars = _.filter(specialVars, (sp) => sp.repl);
|
||||
_.forIn(spVars, (val, key) => {
|
||||
if (cmd.includes(val.label.slice(0, 12))) {
|
||||
if (cmd.includes(val.label.slice(0, -2))) {
|
||||
cmd = cmd.replace(val.match, (x) => val.repl(x));
|
||||
}
|
||||
});
|
||||
@@ -180,7 +180,7 @@ export default {
|
||||
showRunResult(content, isSuccess, action) {
|
||||
this.isResultShow = true;
|
||||
this.runResultStatus = isSuccess;
|
||||
let contlength = content.length;
|
||||
let contlength = content?.length || 0;
|
||||
if (contlength > this.resultMaxLength)
|
||||
content =
|
||||
content.slice(0, this.resultMaxLength - 100) +
|
||||
|
Reference in New Issue
Block a user