版本
@form-create/designer@3.2.8
@form-create/element-ui@3.2.13
使用designer重写了fetch调用,当触发的组件在子表单/分组内时,使用api获取parent对象为null。
FcDesigner.designerForm.fetch = FcDesigner.formCreate.fetch = (options: any, fc: any) => {
const parent = fc.api.parent; //此处返回null
console.log(fc);
console.log(parent);
}
在formCreate中正式渲染时,可以正常获取。
formCreate.fetch = (options: any, fc: any) => {
const parent = fc.api.parent; //此处正常返回父form对象
console.log(fc);
console.log(parent);
};
期望的结果
两边可以保持一致的体验