🐛 fix: Remove unnecessary comments and improve variable handling in GoTemplateEditor; ensure zero value displays as empty in EnhancedInput

This commit is contained in:
web
2025-09-13 02:23:42 -07:00
parent 6376ec1a79
commit c4a47a47dd
27 changed files with 100 additions and 90 deletions
@@ -927,10 +927,8 @@ export function GoTemplateEditor({ schema, enableSprig = true, ...props }: GoTem
let fieldPath = '';
if (isVarDot && varDotMatch) {
// 处理变量后跟点的情况 ($n.)
const variableName = varDotMatch[1];
if (variableName === rangeVariable && activeRangeField) {
// 使用activeRangeField作为字段路径
fieldPath = activeRangeField;
}
} else if (dotMatches && dotMatches[1]) {
@@ -99,7 +99,6 @@ export function EnhancedInput<T = string>({
return;
}
// 确保0值显示为空
if (value === '0') {
setValue('');
onValueBlur?.(processValue(0));