Skip to content

Commit

Permalink
防止字段上的对象名值异常
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Nov 14, 2024
1 parent e06f689 commit 6ab379d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ module.exports = {
_.each(bodyItem.body, (field)=>{
if(_.startsWith(field.type, 'sfield-')){

if(field.config){
field.config.object = object.name
}

if(field.config && field.config.amis){
delete field.config.amis.name
delete field.config.amis.mode
Expand All @@ -406,6 +410,9 @@ module.exports = {
visible_on: bodyItem.visible_on
})
}else if(_.startsWith(bodyItem.type, 'sfield-')){
if(bodyItem.config){
bodyItem.config.object = object.name
}
if(bodyItem.config && bodyItem.config.amis){
delete bodyItem.config.amis.name
delete bodyItem.config.amis.mode
Expand Down

0 comments on commit 6ab379d

Please sign in to comment.