amis icon indicating copy to clipboard operation
amis copied to clipboard

sdk210的input-table无法编辑当前行

Open belongwqz opened this issue 2 years ago • 1 comments

描述问题:

sdk210的input-table无法编辑当前行

截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

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

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

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

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

{
  "type": "page",
  "title": false,
  "data": {
    "init_config": [
      {
        "group": "group1",
        "founder": "zhangsan",
        "job": "job1",
        "start_time": "08:30",
        "end_time": "17:00",
        "dates": [
          "2022-08-15",
          "2022-08-16",
          "2022-08-17",
          "2022-08-18",
          "2022-08-19"
        ],
        "job_primary": "user1",
        "job_secondary": "user2"
      }
    ]
  },
  "body": {
    "type": "input-table",
    "needConfirm": true,
    "name": "init_config",
    "label": false,
    "addable": false,
    "editable": true,
    "removable": true,
    "copyable": false,
    "draggable": false,
    "showIndex": false,
    "perPage": 10,
    "columns": [
      {
        "label": "岗位",
        "name": "job",
        "required": true,
        "quickEdit": {
          "type": "static"
        }
      },
      {
        "label": "主",
        "name": "job_primary",
        "required": true,
        "quickEdit": {
          "type": "select",
          "options": [
            {
              "label": "A",
              "name": "a"
            },
            {
              "label": "B",
              "name": "b"
            }
          ]
        }
      },
      {
        "label": "备",
        "name": "job_secondary",
        "required": false,
        "quickEdit": {
          "type": "select",
          "options": [
            {
              "label": "A",
              "name": "a"
            },
            {
              "label": "B",
              "name": "b"
            }
          ],
          "clearable": true
        }
      },
      {
        "label": "日期",
        "name": "dates",
        "type": "each",
        "required": true,
        "items": {
          "type": "tpl",
          "tpl": "<span class='label label-<%= data.index % 2==0 ? \"info\": \"success\" %> m-0'><%= data.item %></span> "
        },
        "quickEdit": {
          "type": "input-array",
          "name": "dates",
          "inline": true,
          "items": {
            "type": "input-date",
            "format": "YYYY-MM-DD",
            "inputFormat": "YYYY-MM-DD",
            "required": true
          }
        }
      },
      {
        "label": "日期范围",
        "visibleOn": "this.times === 'diy'",
        "name": "date_range_list",
        "type": "each",
        "required": false,
        "items": {
          "type": "tpl",
          "tpl": "<span class='label label-<%= data.index % 2==0 ? \"info\": \"success\" %> m-0'><%= data.item %></span> "
        },
        "quickEdit": {
          "type": "combo",
          "flat": true,
          "name": "date_range_list",
          "multiple": true,
          "required": true,
          "items": [
            {
              "name": "date_range",
              "required": true,
              "label": false,
              "format": "YYYY-MM-DD",
              "type": "input-date-range"
            }
          ]
        }
      },
      {
        "label": "开始时间",
        "toggled": false,
        "name": "start_time",
        "required": true,
        "quickEdit": {
          "type": "input-time",
          "format": "HH:mm",
          "inputFormat": "HH:mm"
        }
      },
      {
        "label": "结束时间",
        "toggled": false,
        "name": "end_time",
        "required": true,
        "quickEdit": {
          "type": "input-time",
          "format": "HH:mm",
          "inputFormat": "HH:mm"
        }
      }
    ]
  }
}
  1. 操作步骤 使用上述代码,点击“编辑当前行”按钮,编辑控件一闪而过无法编辑,2.0.2版本是没问题的。

belongwqz avatar Aug 08 '22 07:08 belongwqz

我也遇到这个问题了,2.0.2 重置不管用,现在降价到1.9.0了希望尽快解决下

lengqingfeng avatar Aug 08 '22 08:08 lengqingfeng

2.2已解决

belongwqz avatar Oct 13 '22 09:10 belongwqz