amis
amis copied to clipboard
Tab内,form容器组件中配置form时,修改内层的form会自动触发上层form的提交操作
描述问题:
Tab内,form容器组件中配置form时,修改内层的form,grid内选择框,会自动触发上层form的提交操作 历史类似问题 https://github.com/baidu/amis/pull/589
截图或视频:

如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
sdk -
粘贴有问题的完整
amis schema代码:
{
"type": "page",
"name": "page1",
"body": {
"type": "form",
"api": "/api/mock2/form/saveForm?pushCode",
"controls": [
{
"type": "tabs",
"tabs": [
{
"title": "testA",
"body": {
"type": "form",
"controls": [
{
"type": "select",
"name": "testA",
"label": "testA",
"inline": true,
"options": [
{
"label": "test1",
"value": 1
},
{
"label": "test2",
"value": 2
}
],
"size": "md",
"checkAll": false,
"clearable": true
}
]
}
},
{
"title": "testB",
controls: [{
body: [{
title: '',
type: 'form',
mode: 'normal',
wrapWithPanel: false,
className: 'm-b',
controls: [{
type: 'grid',
label: '',
columns: [{
controls: [
{
"type": "select",
"name": "testB",
"label": "testB",
"inline": true,
"options": [
{
"label": "test1",
"value": 1
},
{
"label": "test2",
"value": 2
}
],
"size": "md",
"checkAll": false,
"clearable": true
} ],
mode: 'horizontal',
horizontal: {
leftFixed: 'normal',
left: 3,
right: 9
}
} ]
}],
reload: ''
} ],
type: 'page'
}]
}
]
}
]
}
}
- 操作步骤 testA 空白对照,正常 testB 异常, 修改选项,会提交表单
"title": "testB",
controls: [{
controls 先改成 body 吧
未复现,可能是历史bug已修复