mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
修复输出变量临时变量赋值错误和未正确拷贝的BUG
This commit is contained in:
parent
856e381726
commit
bf1d6ff007
@ -258,8 +258,11 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
getAvailableOutputVariable() {
|
||||
let outputVariable = this.localCommand.outputVariable || {};
|
||||
if (!outputVariable.name && !outputVariable.details) {
|
||||
let outputVariable = { ...this.localCommand.outputVariable };
|
||||
if (
|
||||
window.lodashM.isEmpty(outputVariable.name) &&
|
||||
window.lodashM.isEmpty(outputVariable.details)
|
||||
) {
|
||||
outputVariable.name = `temp_${Date.now()}`;
|
||||
}
|
||||
return outputVariable;
|
||||
@ -279,7 +282,10 @@ export default defineComponent({
|
||||
handleAddPrint() {
|
||||
// 创建一个打印命令
|
||||
const outputVariable = this.getAvailableOutputVariable();
|
||||
this.localCommand.outputVariable = outputVariable;
|
||||
this.localCommand = {
|
||||
...this.localCommand,
|
||||
outputVariable,
|
||||
};
|
||||
const consoleLogVars =
|
||||
this.getAvailableOutputVariableName(outputVariable);
|
||||
|
||||
|
@ -147,12 +147,12 @@ export default defineComponent({
|
||||
];
|
||||
|
||||
const clearFlows = () => {
|
||||
updateFlows(defaultFlow);
|
||||
updateFlows(window.lodashM.cloneDeep(defaultFlow));
|
||||
activeTab.value = "main";
|
||||
};
|
||||
|
||||
if (!props.modelValue.flows || props.modelValue.flows.length === 0) {
|
||||
updateFlows(defaultFlow);
|
||||
updateFlows(window.lodashM.cloneDeep(defaultFlow));
|
||||
}
|
||||
|
||||
const flows = computed(() => props.modelValue.flows || []);
|
||||
|
Loading…
x
Reference in New Issue
Block a user