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