🐛 fix: Remove unnecessary comments and improve variable handling in GoTemplateEditor; ensure zero value displays as empty in EnhancedInput
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user