Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.6.0版本 input-table 列表中如果有默认中, 每次添加会卡,编辑的时候也会卡, 10行以上特明显 #10600

Open
zhiqiangcaisina opened this issue Jul 8, 2024 · 3 comments

Comments

@zhiqiangcaisina
Copy link

描述问题:

6.6.0版本 input-table 列表中如果有默认中, 每次添加会卡,编辑的时候也会卡, 10行以上特明显

截图或视频:

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

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

使用第4点的schema进行渲染, 点添加把行数弄到10行以上, 每次点击添加都会卡, 编辑某一行的时候也会卡

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

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

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

{
  "type": "page",
  "body": {
    "type": "page",
    "body": {
      "type": "form",
      "debug": "true",
      "data": {
        "filedList": [
          {
            "field": "status",
            "fieldType": "char",
            "fieldRemark": "状态1有效0无效2删除",
            "fieldLength": "1",
            "isPreKey": "0",
            "isNotNull": "1"
          },
          {
            "field": "createTime",
            "fieldType": "datetime",
            "fieldRemark": "创建时间",
            "fieldLength": "0",
            "isPreKey": "0",
            "isNotNull": "0"
          },
          {
            "field": "createBy",
            "fieldType": "varchar",
            "fieldRemark": "创建人",
            "fieldLength": "255",
            "isPreKey": "0",
            "isNotNull": "0"
          },
          {
            "field": "updateTime",
            "fieldType": "datetime",
            "fieldRemark": "更新时间",
            "fieldLength": "0",
            "isPreKey": "0",
            "isNotNull": "0"
          },
          {
            "field": "updateBy",
            "fieldType": "varchar",
            "fieldRemark": "更新人",
            "fieldLength": "255",
            "isPreKey": "0",
            "isNotNull": "0"
          },
          {
            "field": "remark",
            "fieldType": "varchar",
            "fieldRemark": "备注",
            "fieldLength": "255",
            "isPreKey": "0",
            "isNotNull": "0"
          }
        ]
      },
      "api": "/api/mock2/form/saveForm",
      "body": [
        {
          "type": "input-table",
          "name": "filedList",
          "label": false,
          "columns": [
            {
              "label": "字段描述",
              "name": "fieldRemark",
              "quickEdit": {
                "type": "input-text",
                "name": "fieldRemark",
                "id": "u:5b89c4db9d53"
              },
              "id": "u:9431bbf71c34"
            },
            {
              "label": "字段名称",
              "name": "field",
              "quickEdit": {
                "type": "input-text",
                "name": "field",
                "id": "u:cdffd95948ab"
              },
              "id": "u:27367a8f5973"
            },
            {
              "label": "字段类型",
              "name": "fieldType",
              "quickEdit": {
                "type": "select",
                "name": "fieldType",
                "id": "u:bf98160342f9",
                "multiple": false,
                "options": [
                  {
                    "label": "varchar",
                    "value": "varchar"
                  },
                  {
                    "label": "int",
                    "value": "int"
                  },
                  {
                    "label": "datetime",
                    "value": "datetime"
                  },
                  {
                    "label": "longblob",
                    "value": "longblob"
                  },
                  {
                    "label": "text",
                    "value": "text"
                  },
                  {
                    "label": "longtext",
                    "value": "longtext"
                  },
                  {
                    "label": "char",
                    "value": "char"
                  }
                ],
                "value": "varchar"
              },
              "id": "u:59f143dc7f32"
            },
            {
              "label": "字段长度",
              "name": "fieldLength",
              "quickEdit": {
                "type": "input-number",
                "name": "fieldLength",
                "id": "u:71c11379ffc4"
              },
              "id": "u:3236c9b71135"
            },
            {
              "label": "是否主键",
              "name": "isPreKey",
              "quickEdit": {
                "type": "select",
                "name": "isPreKey",
                "id": "u:62f299bf03ec",
                "options": [
                  {
                    "label": "否",
                    "value": "0"
                  },
                  {
                    "label": "是",
                    "value": "1"
                  }
                ],
                "value": "0",
                "multiple": false
              },
              "id": "u:358401a6724d"
            },
            {
              "label": "是否非空",
              "name": "isNotNull",
              "quickEdit": {
                "type": "select",
                "name": "isNotNull",
                "id": "u:e19d6a4c7e87",
                "options": [
                  {
                    "label": "否",
                    "value": "0"
                  },
                  {
                    "label": "是",
                    "value": "1"
                  }
                ],
                "value": "0",
                "multiple": false
              },
              "id": "u:b3b4a6a45da7"
            },
            {
              "label": "是否外键",
              "name": "isForeignKey",
              "quickEdit": {
                "type": "select",
                "name": "isForeignKey",
                "id": "u:0526cee44723",
                "options": [
                  {
                    "label": "否",
                    "value": "0"
                  },
                  {
                    "label": "是",
                    "value": "1"
                  }
                ],
                "value": "0",
                "multiple": false
              },
              "id": "u:5ecd2170a0d4"
            },
            {
              "label": "关联字典",
              "name": "assDictType",
              "quickEdit": {
                "type": "input-text",
                "name": "assDictType",
                "id": "u:49128d5128ed"
              },
              "id": "u:5730adf6c832"
            }
          ],
          "addable": true,
          "footerAddBtn": {
            "label": "新增",
            "icon": "fa fa-plus",
            "id": "u:ef9681dc8fa7"
          },
          "strictMode": true,
          "id": "u:4f6f0df7c072",
          "minLength": 1,
          "columnsTogglable": false,
          "mode": "horizontal",
          "removable": true,
          "needConfirm": false
        }
      ]
    }
  }
}
  1. 操作步骤
    请简单描述一下复现的操作步骤...
@lengqingfeng
Copy link
Contributor

现在业务上也遇到类似问题,服务端3秒,页面需要渲染14s 左右才渲染完成。如何优化?

@lhtuling
Copy link

回退版本吧。。估计新bug了
6.0很流畅
image

@zhiqiangcaisina
Copy link
Author

等我对比下好的版本和新的版本差异在哪里研究下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants