mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 06:54:11 +08:00
修复可视化编排的命令定时任务和主搜索框推送失效的BUG
This commit is contained in:
parent
34230fa140
commit
fcf3d5912e
@ -16,6 +16,8 @@ import programmings from "./js/options/programs.js";
|
||||
import defaultProfile from "./js/options/defaultProfile.js";
|
||||
import Cron from "croner";
|
||||
import QuickCommand from "components/quickcommandUI/QuickCommand";
|
||||
import { generateFlowsCode } from "js/composer/generateCode";
|
||||
|
||||
// import autoDetach from "./js/autoDetach.js";
|
||||
|
||||
export default defineComponent({
|
||||
@ -157,10 +159,13 @@ export default defineComponent({
|
||||
reslove([`超过${timeout}ms未响应`]);
|
||||
}, timeout);
|
||||
let command = dbManager.getDB("qc_" + featureCode);
|
||||
let commandCode = command.cmd;
|
||||
let commandCode =
|
||||
command.program === "quickcomposer"
|
||||
? generateFlowsCode(command.flows)
|
||||
: command.cmd;
|
||||
if (mainInput)
|
||||
commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput);
|
||||
if (command.program === "quickcommand") {
|
||||
if (["quickcommand", "quickcomposer"].includes(command.program)) {
|
||||
window.runCodeInSandbox(commandCode, (stdout, stderr) => {
|
||||
stderr && reslove([stderr.toString()]);
|
||||
reslove(stdout);
|
||||
|
Loading…
x
Reference in New Issue
Block a user