Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在fetch中使用api获取parent对象designer与formCreate行为不一致 #740

Open
selfly opened this issue Nov 20, 2024 · 0 comments
Open

Comments

@selfly
Copy link

selfly commented Nov 20, 2024

版本
@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);
 };

期望的结果

两边可以保持一致的体验

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant