2019-04-30 11:11:25 +08:00
|
|
|
export default {
|
2019-11-07 10:41:14 +08:00
|
|
|
title: 'SubForm 示例',
|
|
|
|
body: [
|
|
|
|
{
|
|
|
|
type: 'form',
|
|
|
|
api: '/api/mock2/saveForm?waitSeconds=2',
|
|
|
|
title: 'Form elements',
|
|
|
|
mode: 'horizontal',
|
|
|
|
// debug: true,
|
2021-06-07 10:09:55 +08:00
|
|
|
body: [
|
2019-04-30 11:11:25 +08:00
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
type: 'input-sub-form',
|
2019-11-07 10:41:14 +08:00
|
|
|
label: '子表单单条',
|
|
|
|
name: 'subForm1',
|
2021-06-07 10:09:55 +08:00
|
|
|
btnLabel: '点击设置${a}',
|
2019-11-07 10:41:14 +08:00
|
|
|
form: {
|
|
|
|
title: '子表单',
|
2021-06-07 10:09:55 +08:00
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
name: 'a',
|
2021-06-07 10:09:55 +08:00
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
label: 'Foo'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'b',
|
|
|
|
type: 'switch',
|
|
|
|
label: 'Boo'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
type: 'input-sub-form',
|
2019-11-07 10:41:14 +08:00
|
|
|
label: '子表单多条',
|
|
|
|
name: 'subForm2',
|
|
|
|
labelField: 'a',
|
|
|
|
btnLabel: '点击设置',
|
|
|
|
multiple: true,
|
|
|
|
form: {
|
|
|
|
title: '子表单',
|
2021-06-07 10:09:55 +08:00
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
name: 'a',
|
2021-06-07 10:09:55 +08:00
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
label: 'Foo'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'b',
|
|
|
|
type: 'switch',
|
|
|
|
label: 'Boo'
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
]
|
2019-11-07 10:41:14 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-11-07 10:41:14 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2019-04-30 11:11:25 +08:00
|
|
|
};
|