amis icon indicating copy to clipboard operation
amis copied to clipboard

InputTable 组件 add 事件参数与文档不一致问题

Open findreamer opened this issue 1 year ago • 0 comments

描述问题:

InputTable 组件 add 事件升级版本后,事件参数与文档和低版本amis参数不一致。 在源码中,copyItemaddItem方法出发add事件参数不一致。

截图或视频:

image image image

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 amis 6.4.0

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

{
  "type": "page",
  "body": {
    "type": "form",
    "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm",
    "body": [
      {
        "type": "input-table",
        "name": "table",
        "addable": true,
        "editable": true,
        "rowClassNameExpr": "${ a === 'a' ? 'bg-success' : '' }",
        "columns": [
          {
            "name": "a",
            "label": "A"
          }
        ],
        "onEvent": {
          "add": {
            "actions": [
              {
                "actionType": "custom",
                "script": "console.log(event.data)"
              }
            ]
          }
        }
      }
    ]
  }
}
  1. 操作步骤 请简单描述一下复现的操作步骤...

findreamer avatar May 11 '24 14:05 findreamer