amis icon indicating copy to clipboard operation
amis copied to clipboard

CRUD 组件增加 “行点击”+“变量赋值” 事件后,第一次点击正常,第二次开始报错

Open Ice-clean opened this issue 2 years ago • 1 comments

描述问题:

CRUD 组件增加 “行点击”+“变量赋值” 事件后,第一次点击正常,第二次开始报错。即使变量赋值事件什么都不干(排除了赋值影响)

截图或视频:

image image 第一次正常,随后都报错

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

  1. 你是如何使用 amis 的? sdk

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 官方编辑器、以及 6.2.2 版本,都一样会报错

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

{
  "type": "crud",
  "id": "u:416b1ca845d9",
  "syncLocation": false,
  "columns": [
    {
      "label": "测试行",
      "name": "name",
      "id": "u:c244f8de2291"
    }
  ],
  "messages": {},
  "autoFillHeight": false,
  "bodyClassName": "",
  "className": "",
  "onEvent": {
    "rowClick": {
      "weight": 0,
      "actions": [
        {
          "componentId": "u:416b1ca845d9",
          "ignoreError": false,
          "actionType": "setValue",
          "args": {
            "value": {
              "aaa": "bbb"
            }
          }
        }
      ]
    }
  },
  "primaryField": "id",
  "data": {
    "list": [
      {
        "name": "第一行"
      },
      {
        "name": "第二行"
      },
      {
        "name": "第三行"
      }
    ]
  },
  "source": "$list",
  "perPageAvailable": [
    10
  ],
  "bulkActions": []
}
  1. 操作步骤
  2. 使用 CURD 组件(经测试 table 组件也存在)
  3. 添加行点击事件类型,添加变量赋值事件
  4. 点击列表行(第一次正常),随后继续点击会报错

Ice-clean avatar Mar 26 '24 10:03 Ice-clean

这个最新版本已经修复, 等待下个版本发布 6.3.0 https://github.com/baidu/amis/pull/9778

2betop avatar Mar 26 '24 10:03 2betop