mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 21:46:12 +08:00
完善输出变量按钮提示
This commit is contained in:
parent
deade3e1de
commit
b964cdc839
@ -154,16 +154,18 @@ export default defineComponent({
|
|||||||
if (cmd.outputVariable && cmd.asyncMode !== "then") {
|
if (cmd.outputVariable && cmd.asyncMode !== "then") {
|
||||||
const { name, details = {} } = cmd.outputVariable;
|
const { name, details = {} } = cmd.outputVariable;
|
||||||
variables.push(
|
variables.push(
|
||||||
...[name, ...Object.values(details)].map((variable) => ({
|
...[name, ...Object.values(details)]
|
||||||
name: variable,
|
.filter((v) => v)
|
||||||
// 提供来源命令的标志信息
|
.map((variable) => ({
|
||||||
sourceCommand: {
|
name: variable,
|
||||||
label: cmd.label,
|
// 提供来源命令的标志信息
|
||||||
id: cmd.id,
|
sourceCommand: {
|
||||||
index,
|
label: cmd.label,
|
||||||
},
|
id: cmd.id,
|
||||||
type: "output",
|
index,
|
||||||
}))
|
},
|
||||||
|
type: "output",
|
||||||
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -274,10 +276,7 @@ export default defineComponent({
|
|||||||
(v) => v.type === "var"
|
(v) => v.type === "var"
|
||||||
);
|
);
|
||||||
// 完全更新参数
|
// 完全更新参数
|
||||||
this.subFlows[index].customVariables = [
|
this.subFlows[index].customVariables = [...newParams, ...localVars];
|
||||||
...newParams,
|
|
||||||
...localVars,
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
generateFlowCode(flow) {
|
generateFlowCode(flow) {
|
||||||
return generateCode(flow);
|
return generateCode(flow);
|
||||||
|
@ -19,7 +19,20 @@
|
|||||||
<q-tooltip>
|
<q-tooltip>
|
||||||
<div class="text-body2">输出配置</div>
|
<div class="text-body2">输出配置</div>
|
||||||
<div class="text-caption text-grey-5">
|
<div class="text-caption text-grey-5">
|
||||||
配置输出变量、是否等待执行完毕等
|
<div class="row items-center">
|
||||||
|
本命令配置输出变量数
|
||||||
|
<q-badge color="primary" class="output-badge">
|
||||||
|
{{ outputLength }}
|
||||||
|
</q-badge>
|
||||||
|
</div>
|
||||||
|
<div class="row items-center">
|
||||||
|
{{ isThenCommand ? "不用" : "需要" }}等待命令运行完毕
|
||||||
|
<q-badge color="primary" class="output-badge">
|
||||||
|
<q-icon
|
||||||
|
:name="isThenCommand ? 'update_disabled' : 'schedule'"
|
||||||
|
/>
|
||||||
|
</q-badge>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
@ -139,6 +152,17 @@ export default {
|
|||||||
showOutputEditor: false,
|
showOutputEditor: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isThenCommand() {
|
||||||
|
return this.command.asyncMode === "then";
|
||||||
|
},
|
||||||
|
outputLength() {
|
||||||
|
return (
|
||||||
|
Object.keys(this.command.outputVariable?.details || {}).length +
|
||||||
|
(this.command.outputVariable?.name ? 1 : 0)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
emits: [
|
emits: [
|
||||||
"update:outputVariable",
|
"update:outputVariable",
|
||||||
"run",
|
"run",
|
||||||
@ -225,4 +249,14 @@ export default {
|
|||||||
min-width: 24px;
|
min-width: 24px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.output-badge {
|
||||||
|
font-size: 10px;
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user