mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 13:28:49 +08:00
65ac422ed6
* 补充容错 * fix: form 中 name 关联顶层数据初始化失效 * 更新 examples * 文档调整 * 删除多余的文档, 调整 schema * schema 调整 * schema 调整 * control 类型容器 control 改成 body * 修复一个选项加载的bug * form 注册直接用 type
148 lines
3.2 KiB
JavaScript
148 lines
3.2 KiB
JavaScript
export default {
|
|
title: 'FieldSet 示例',
|
|
body: [
|
|
{
|
|
type: 'form',
|
|
mode: 'horizontal',
|
|
api: '/api/mock2/saveForm?waitSeconds=2',
|
|
actions: [
|
|
{
|
|
type: 'submit',
|
|
label: '提交',
|
|
primary: true
|
|
}
|
|
],
|
|
collapsable: true,
|
|
title: 'fieldSet 可以对表单元素做个分组',
|
|
body: [
|
|
{
|
|
type: 'fieldSet',
|
|
title: '基本信息',
|
|
collapsable: true,
|
|
body: [
|
|
{
|
|
type: 'group',
|
|
body: [
|
|
{
|
|
type: 'input-email',
|
|
name: 'email',
|
|
placeholder: '请输入邮箱地址',
|
|
label: '邮箱'
|
|
},
|
|
{
|
|
type: 'input-password',
|
|
name: 'password',
|
|
label: false,
|
|
placeholder: 'Password'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
type: 'divider'
|
|
},
|
|
{
|
|
type: 'group',
|
|
body: [
|
|
{
|
|
type: 'input-email',
|
|
name: 'email',
|
|
placeholder: '请输入邮箱地址',
|
|
label: '邮箱'
|
|
},
|
|
{
|
|
type: 'checkbox',
|
|
name: 'rememberMe',
|
|
label: false,
|
|
option: 'Remember me'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
title: '其他信息',
|
|
type: 'fieldSet',
|
|
body: [
|
|
{
|
|
type: 'input-email',
|
|
name: 'email',
|
|
placeholder: '请输入邮箱地址',
|
|
label: '邮箱'
|
|
},
|
|
{
|
|
type: 'divider'
|
|
},
|
|
{
|
|
type: 'checkbox',
|
|
name: 'rememberMe',
|
|
option: '记住我'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: 'FieldSet 样式集',
|
|
type: 'form',
|
|
body: [
|
|
{
|
|
title: '超级小',
|
|
type: 'fieldSet',
|
|
className: 'fieldset-xs',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
text: '文本 ...'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: '小尺寸',
|
|
type: 'fieldSet',
|
|
className: 'fieldset-sm',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
text: '文本 ...'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: '正常尺寸',
|
|
type: 'fieldSet',
|
|
className: 'fieldset',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
text: '文本 ...'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: '中大尺寸',
|
|
type: 'fieldSet',
|
|
className: 'fieldset-md',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
text: '文本 ...'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: '超大尺寸',
|
|
type: 'fieldSet',
|
|
className: 'fieldset-lg',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
text: '文本 ...'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|