描述问题:
表单内放组合输入组件 组合输入内组件输入值点击表单保存会出现输入的值被清空的情况
截图或视频:
输入内容后点保存,值就清空了,多次试验发现它还原了表单旧值、就是没修改之前的数据
如何复现(请务必完整填写下面内容):
- 你是如何使用 amis 的?
npm - amis 版本是什么?请先在最新 beta 版本测试问题是否存在
3.4.1 - 粘贴有问题的完整
amis schema
代码:
{
"type": "page",
"id": "u:2d04f7a66df2",
"css": {
".text-overflow-sold": {
"overflow": "hidden",
"white-space": "nowrap",
"text-overflow": "ellipsis"
},
"table:not(.cxd-Table-table) .cxd-Form--isStatic .cxd-Form-value .cxd-Form-static": {
"border": "0px"
}
},
"regions": [
"body"
],
"data": {
},
"onEvent": {
"init": {
"weight": 0,
"actions": [
]
}
},
"asideResizor": false,
"messages": {
},
"style": {
"boxShadow": " 0px 0px 0px 0px transparent"
},
"body": [
{
"data": {
"xxxList": [
{
}
],
"operationType": "bbb"
},
"footerClassName": "",
"subFormHorizontal": {
"leftFixed": "",
"left": 3,
"right": 9
},
"initApi": {
"data": {
"id": "1700063435790675970"
},
"method": "get",
"sendOn": "",
"adaptor": "",
"messages": {
},
"responseData": {
"&": "$$"
},
"requestAdaptor": "",
"url": ""
},
"className": "mb-16",
"body": [
{
"hidden": false,
"active": "4",
"links": [
{
"id": "u:de45696c5263",
"href": "4",
"body": [
{
"name": "text",
"id": "u:d621c1d9a5d9",
"label": "文本",
"type": "input-text",
"required": true
},
{
"multiLine": true,
"minLength": 0,
"strictMode": false,
"multiple": true,
"label": "",
"noBorder": true,
"type": "combo",
"addBtn": {
"size": "sm",
"level": "primary",
"icon": "fa fa-plus",
"id": "u:71dc44c9978c",
"label": "新增"
},
"canAccessSuperData": true,
"deleteBtn": {
"level": "danger",
"className": "r w-24 delBtn",
"disabledOn": "${facBindingMainVoList.length <=1}",
"id": "u:dc7e70b4357e",
"label": "CO_DELETE"
},
"addable": false,
"draggable": false,
"flat": false,
"removable": false,
"name": "xxxList",
"removableMode": "icon",
"id": "u:208d3269b3cf",
"inputClassName": "relative",
"items": [
{
"hidden": false,
"headingClassName": "font-bold w-full text-base r-t r-l",
"collapseHeader": "信息",
"bodyClassName": "p-t-sm b-a b-primary r-b",
"active": true,
"header": "信息",
"className": "",
"id": "u:aac948mhjm2",
"body": [
{
"inline": true,
"subFormMode": "horizontal",
"columns": [
{
"md": 4,
"columnClassName": "w-full",
"valign": "top",
"id": "u:6ecb95f62660",
"body": [
{
"autoComplete": "",
"labelClassName": "",
"columnClassName": "",
"className": "",
"columnRatio": 3,
"label": "字段1",
"editorPath": "input.base.default",
"type": "input-text",
"mode": "horizontal",
"horizontal": {
"left": 4,
"right": 8
},
"size": "",
"inline": false,
"hint": "",
"name": "item",
"id": "u:e6706aa442831e",
"placeholder": "",
"inputClassName": "w-full",
"maxLength": 500
}
]
},
{
"md": 4,
"valign": "top",
"id": "u:0b159ac6fe18",
"body": [
{
"autoComplete": "",
"labelClassName": "",
"columnClassName": "",
"className": "",
"columnRatio": 3,
"label": "字段二",
"type": "input-text",
"required": true,
"mode": "horizontal",
"horizontal": {
"left": 4,
"right": 8
},
"size": "",
"inline": false,
"hint": "",
"name": "policy",
"id": "u:4c3cb94b1875",
"placeholder": "",
"inputClassName": "w-full",
"maxLength": 50
}
]
},
{
"md": 4,
"valign": "top",
"id": "u:63d52d3f201d",
"body": [
]
}
],
"gap": "xs",
"subFormHorizontal": {
"leftFixed": "",
"left": 4,
"right": 8
},
"valign": "middle",
"className": "m-b-sm",
"id": "u:a1a3d12cc6a9",
"type": "grid",
"align": "center"
}
],
"type": "collapse",
"cssVars": {
"--bg-cyan-200": "#a5f3fc !important"
},
"key": "4"
}
],
"syncFields": [
]
}
],
"title": "FAC_BINDING_INFO"
}
],
"id": "u:14326d3c5367",
"type": "anchor-nav",
"linkClassName": "fixed right-10 top-30 w-48 z-50 anchorNavigation",
"direction": "vertical"
}
],
"type": "form",
"title": "",
"affixFooter": false,
"id": "u:90e5806fbbd1",
"api": {
"data": {
"&": "$$"
},
"method": "get",
"adaptor": "",
"messages": {
},
"requestAdaptor": "",
"url": "/aa"
},
"actions": [
{
"buttons": [
{
"hiddenOn": "${type == '0'}",
"level": "primary",
"onEvent": {
"click": {
"actions": [
{
"args": {
"value": {
"operationType": "save"
}
},
"actionType": "setValue",
"componentId": "u:90e5806fbbd1",
"ignoreError": false
},
{
"actionType": "submit",
"componentId": "u:90e5806fbbd1"
}
]
}
},
"className": "r w-24 mr-1",
"id": "u:d0ea0f3a64bd",
"label": "CO_SAVE",
"type": "button"
}
],
"id": "u:fda5708fb53b",
"type": "button-group"
}
],
"staticOn": "${type == '0'}"
}
],
"cssVars": {
"--ml-14": "margin-left: 3.5%"
}
}```
4. 操作步骤
请简单描述一下复现的操作步骤...
2条答案
按热度按时间s3fp2yjn1#
👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.
brqmpdu12#
@2betop 看看这个bug