mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-15 09:21:13 +08:00
amis-saas-5770 [Feature] 「input-sub-form」子表单项配置成员渲染器,控制台报错,无法成功配置
Change-Id: If09d3b094a65c9cbe7f98bd274b55c8ce84f9ee4
This commit is contained in:
parent
2fc979f0b9
commit
60016505cc
@ -165,6 +165,7 @@ export class SubFormControlPlugin extends BasePlugin {
|
||||
type: 'dialog',
|
||||
body: {
|
||||
type: 'form',
|
||||
className: 'h-full pl-4 pr-4',
|
||||
...rest
|
||||
}
|
||||
};
|
||||
@ -174,10 +175,29 @@ export class SubFormControlPlugin extends BasePlugin {
|
||||
value: schema,
|
||||
memberImmutable: ['body'],
|
||||
onChange: newValue => {
|
||||
const form = newValue.body[0];
|
||||
const {
|
||||
title,
|
||||
actions,
|
||||
name,
|
||||
size,
|
||||
closeOnEsc,
|
||||
showCloseButton,
|
||||
bodyClassName,
|
||||
body
|
||||
} = newValue;
|
||||
|
||||
newValue = {
|
||||
...value,
|
||||
form
|
||||
form: {
|
||||
title,
|
||||
actions,
|
||||
name,
|
||||
size,
|
||||
closeOnEsc,
|
||||
showCloseButton,
|
||||
bodyClassName,
|
||||
...body[0]
|
||||
}
|
||||
};
|
||||
// delete newValue.form.body;
|
||||
delete newValue.form.type;
|
||||
|
Loading…
Reference in New Issue
Block a user