Update main.js

This commit is contained in:
北海一刀 2021-11-19 19:29:17 +08:00
parent c89f3c79bd
commit b0e7b605b6
1 changed files with 11 additions and 1 deletions

View File

@ -361,7 +361,7 @@ export default class form extends React.Component {
let formItem_com = _.get(formItem, "props.children.props");
if(formItem_com.hasOwnProperty("children"))
if(formItem_com && formItem_com.hasOwnProperty("children"))
{
if(_.isArray(formItem_com.children))
@ -374,6 +374,16 @@ export default class form extends React.Component {
}
//
}
else{
let coms = _.get(formItem, "props.children");
if(coms&&_.isArray(coms))
{
console.log(787787878)
console.log(coms)
formItem_com = coms[0].props;
}
}
console.log(formItem)
//对应的验证规则
let rules_item = _.get(this.props.rules, formItem.props.prop)