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

FormTypes.popup重复点击会将子表值置空 #2117

Closed
kx-hdh opened this issue Dec 16, 2020 · 6 comments
Closed

FormTypes.popup重复点击会将子表值置空 #2117

kx-hdh opened this issue Dec 16, 2020 · 6 comments

Comments

@kx-hdh
Copy link

kx-hdh commented Dec 16, 2020

版本号:

2.4.0

问题描述:

子表使用FormTypes.popup,第一次点击会正常返回值,再一次选择重复数据点击会将子表值置空,而且不能进行赋值

截图&代码:

image

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

代码贴一下

@kx-hdh
Copy link
Author

kx-hdh commented Dec 16, 2020

image

@kx-hdh
Copy link
Author

kx-hdh commented Dec 16, 2020

        title: '盒子编码' ,
        key: 'boxCode' ,
        type: FormTypes.popup ,
        popupCode: 'box_manage' ,
        field: 'boxid,boxcode,remainnum' ,
        orgFields: 'boxid,boxcode,remainnum' ,
        destFields: 'boxId,boxCode,remainNum',
        validateRules: [{required: true, message: '${title}不能为空'}],

@kx-hdh
Copy link
Author

kx-hdh commented Dec 16, 2020

并且给这个加validateRules会出错,明明有数据,还是未填写状态
image

@lsqGitHub716
Copy link

你把 field: 'boxid,boxcode,remainnum' ,这个配置去掉再试一下看看

@sjlei
Copy link

sjlei commented Mar 31, 2021

你的用法不对,field字段不能用逗号分割,只能填一个字段,如下所示:

{
        title: '盒子编码' ,
        key: 'boxCode' ,
        type: FormTypes.popup ,
        popupCode: 'box_manage' ,
        field: 'boxId' , // 从destFields中选择一个属性的值返回给当前组件
        orgFields: 'boxid,boxcode,remainnum' ,
        destFields: 'boxId,boxCode,remainNum',
        validateRules: [{required: true, message: '${title}不能为空'}],
}

参考文档:
image

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

4 participants