Merge remote-tracking branch 'origin/develop3' into develop3

This commit is contained in:
dengqichen 2025-10-24 16:13:00 +08:00
commit dbcda1a192

View File

@ -32,12 +32,14 @@ export const ApproverPropertyConfig: React.FC<PropertyConfigProps> = ({
const [form] = Form.useForm();
// 🔄 按需加载数据源(只加载当前选中的审批人类型对应的数据源)
// 获取当前审批人类型,默认为 'USER'
const currentApproverType = field.approverType || 'USER';
// 只有当选中对应类型时才加载数据源
const { options: userOptions } = useFieldOptions({
dataSourceType: currentApproverType === 'USER' ? 'predefined' : 'static', // 只在选中时加载
dataSourceType: currentApproverType === 'USER' ? 'predefined' : 'static',
predefinedDataSource: { sourceType: DataSourceType.USERS },
options: [] // 未选中时使用空数组
options: [] // 未选中时返回空数组
});
const { options: roleOptions } = useFieldOptions({