amis ombo组件删除的同时,修改指定行的数据,但修改没有任何效果

0tdrvxhp  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(115)
描述问题:

我需要再combo组件删除的同时,修改指定行的数据,但修改没有任何效果

截图或视频:

video.webm

如何复现(请务必完整填写下面内容):

粘贴有问题的完整 amis schema 代码:

{
  "type": "form",
  "id": "u:1bd293cd8bba",
  "title": "表单",
  "mode": "normal",
  "dsType": "api",
  "feat": "Insert",
  "body": [
    {
      "type": "combo",
      "id": "u:6668b5cd6246",
      "name": "combo11",
      "label": "组合多条多行内联",
      "multiple": true,
      "multiLine": false,
      "inline": true,
      "value": [
        {}
      ],
      "items": [
        {
          "type": "input-time-range",
          "label": "时间范围",
          "name": "start",
          "id": "u:5c130c3d188f",
          "displayFormat": "HH:mm",
          "placeholder": "请选择时间范围",
          "valueFormat": "HH:mm",
          "minDate": "",
          "shortcuts": [],
          "extraName": "end",
          "endPlaceholder": "结束时间",
          "onEvent": {
            "change": {
              "weight": 0,
              "actions": []
            }
          },
          "autoFill": {},
          "required": true,
          "embed": false,
          "unique": true,
          "value": "",
          "maxDate": ""
        },
        {
          "type": "select",
          "label": "价格类别",
          "name": "price_category",
          "options": [
            {
              "label": "尖费率",
              "value": 0
            },
            {
              "label": "峰费率",
              "value": 1
            },
            {
              "label": "平费率",
              "value": 2
            },
            {
              "label": "谷费率",
              "value": 3
            }
          ],
          "id": "u:c800ea06ec55",
          "multiple": false,
          "required": true,
          "value": ""
        }
      ],
      "strictMode": true,
      "maxLength": 24,
      "minLength": 1,
      "addBtn": {
        "label": "新增",
        "icon": "fa fa-plus",
        "level": "primary",
        "size": "sm",
        "id": "u:23e12228b40e",
        "onEvent": {
          "click": {
            "weight": 0,
            "actions": [
              {
                "componentId": "u:6668b5cd6246",
                "ignoreError": false,
                "actionType": "setValue",
                "args": {
                  "value": {
                    "start": "${combo11[COUNT(combo11)-1].end}",
                    "end": "23:59"
                  },
                  "index": "${COUNT(combo11)}"
                }
              }
            ]
          }
        }
      },
      "addable": true,
      "removableMode": "button",
      "removable": true,
      "canAccessSuperData": false,
      "draggable": false,
      "tabsMode": false,
      "size": "full",
      "syncFields": [],
      "lazyLoad": false,
      "onEvent": {
        "delete": {
          "weight": 0,
          "actions": [
            {
              "componentId": "u:6668b5cd6246",
              "groupType": "component",
              "actionType": "setValue",
              "args": {
                "value": {
                  "price_category": "1"
                },
                "index": 0
              }
            }
          ]
        }
      }
    }
  ],
  "actions": [
    {
      "type": "button",
      "label": "提交",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "submit",
              "componentId": "u:1bd293cd8bba"
            }
          ]
        }
      },
      "level": "primary",
      "id": "u:036331da1352"
    },
    {
      "type": "button",
      "label": "按钮",
      "onEvent": {
        "click": {
          "actions": []
        }
      },
      "id": "u:b7382674a7a8"
    }
  ],
  "resetAfterSubmit": true,
  "debug": true,
  "onEvent": {
    "broadcast_155": {
      "weight": 0,
      "actions": [
        {
          "componentId": "u:7a7e5dd11880",
          "ignoreError": false,
          "actionType": "setValue",
          "args": {
            "value": "123"
          }
        }
      ]
    }
  }
}
  1. 操作步骤
    combo组件增加了多行
    删除其中一行
    自动修改第一行数据
vltsax25

vltsax251#

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

相关问题