基本用法
最基本的用法是配置表单项和提交接口API。
表单展示
首先展示默认模式:
其代码
{
"type": "page",
"body": {
"type": "form",
"api": "/amis/api/mock2/form/saveForm",
"body": [
{
"type": "input-text",
"name": "name",
"label": "姓名:"
},
{
"name": "email",
"type": "input-email",
"label": "邮箱:"
}
]
}
}
只需要对其加入一些方法就可以改变其模式以及其他功能。
首先就是设置水平。
我们可以在mode中添加horizontal是表单水平,也可以通过配置horizontal的属性使其调整偏移量,格式如下:
"horizontal": {
"left&