perf: 优化默认值设置

pull/148/head
xiaojunnuo 2024-08-06 11:32:25 +08:00
parent 24c7be2c9c
commit 1af19f0ac0
1 changed files with 2 additions and 9 deletions

View File

@ -148,15 +148,8 @@ export default {
// stepinput
changeCurrentPlugin(currentStep.value);
//
//
_.merge(currentStep.value, { input: {}, strategy: { runStrategy: 0 } }, currentPlugin.value.default, currentStep.value);
for (const key in currentPlugin.value.input) {
const input = currentPlugin.value.input[key];
if (input.default != null) {
currentStep.value.input[key] = input.default ?? input.value;
}
}
};
const stepDrawerShow = () => {
@ -229,7 +222,7 @@ export default {
}
}
//
if (input.default != null && currentStep.value.input[key] == null) {
if ((input.default != null || input.value != null) && currentStep.value.input[key] == null) {
currentStep.value.input[key] = input.default ?? input.value;
}
}