fix: field linkage rules in filter form block missing 'current form' variable (#6794)

This commit is contained in:
Katherine 2025-04-28 17:48:12 +08:00 committed by GitHub
parent 19225ab829
commit f964d25bfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -116,7 +116,6 @@ export const FormLinkageRules = withDynamicSchemaProps(
returnScope ?? returnScope ??
((options) => ((options) =>
options.filter((v) => { options.filter((v) => {
console.log(category);
if (category === LinkageRuleCategory.block) { if (category === LinkageRuleCategory.block) {
return !['$nForm', '$nRecord'].includes(v.value); return !['$nForm', '$nRecord'].includes(v.value);
} }

View File

@ -78,7 +78,10 @@ export const useCurrentFormContext = ({ form: _form }: Pick<Props, 'form'> = {})
currentFormCtx: formInstance?.values, currentFormCtx: formInstance?.values,
/** 用来判断是否可以显示`当前表单`变量 */ /** 用来判断是否可以显示`当前表单`变量 */
shouldDisplayCurrentForm: shouldDisplayCurrentForm:
name === 'form' && formInstance && !formInstance.readPretty && !isVariableParsedInOtherContext, ['form', 'filter-form'].includes(name) &&
formInstance &&
!formInstance.readPretty &&
!isVariableParsedInOtherContext,
}; };
}; };