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

[严重]-表格(表格编辑框、CRUD)如果有浮动列,点击行,浮动列背景变透明了 #7585

Closed
Icodezhan opened this issue Jul 26, 2023 · 2 comments · Fixed by #7597

Comments

@Icodezhan
Copy link

描述问题:

表格(表格编辑框、CRUD)如果有浮动列,点击行,浮动列背景变透明了,看下图视频右边三列是浮动固定列

截图或视频:

Video_2023-07-26_110914.mp4

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

  1. 你是如何使用 amis 的?
    sdknpm其他...

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

截至今天master分支最新代码

  1. 粘贴有问题的完整 amis schema 代码:
{
  "type": "page",
  "title": "Hello world",
  "body": [
    {
      "type": "form",
      "title": "表单",
      "body": [
        {
          "label": false,
          "type": "input-table",
          "name": "this100LossList",
          "id": "this100LossTable",
          "syncLocation": false,
          "columns": [
            {
              "tpl": "${index+1}",
              "en-US": {
                "label": "No."
              },
              "quickEdit": false,
              "name": "sn",
              "width": 40,
              "id": "u:dab7490e8f9f",
              "label": "序号",
              "type": "text"
            },
            {
              "padding": 2,
              "static": true,
              "quickEdit": false,
              "name": "layer",
              "width": 50,
              "id": "u:af78f4e7516b",
              "label": "",
              "type": "input-text"
            },
            {
              "keyboard": true,
              "en-US": {
                "label": "Total Paid Loss"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "totalPaidLoss",
              "width": 100,
              "fixed": "",
              "className": "text-right",
              "id": "u:5c093f464611",
              "label": "Total Paid Loss",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "Previous Total Paid Loss"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "preTotalPaidLoss",
              "width": 150,
              "id": "u:b927b01ab2c3",
              "label": "Previous Total Paid Loss",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "This Paid Loss before AAD"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "thisPaidLossBeforeAad",
              "width": 170,
              "toggled": true,
              "id": "u:03f9f416ce5b",
              "label": "This Paid Loss before AAD",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "This Paid Loss absorbed by AAD"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "thisPaidLossAbsorbedByAad",
              "width": 210,
              "toggled": true,
              "id": "u:61bf9fae637a",
              "label": "This Paid Loss absorbed by AAD",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "This Paid Loss after AAD"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "thisPaidLossAfterAad",
              "width": 160,
              "id": "u:01d6a2f4f1a0",
              "label": "This Paid Loss after AAD",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "Provisional O/S Loss"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "provOsLoss",
              "width": 140,
              "toggled": true,
              "id": "u:2da254ee0b8e",
              "label": "Provisional O/S Loss",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "en-US": {
                "label": "O/S Loss Within Treaty Capacity"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "osWithinCapacity",
              "width": 220,
              "id": "u:79965dc860a1",
              "label": "O/S Loss Within Treaty Capacity",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "quickEdit": false,
              "name": "acNo",
              "id": "u:14908edecfaa",
              "label": "This Paid Claim A/C No",
              "placeholder": "CO_STSTEM_CREATE"
            },
            {
              "en-US": {
                "label": "Share %"
              },
              "static": true,
              "precision": 2,
              "label": "Share%",
              "type": "input-number",
              "suffix": "%",
              "groupName": "TPRB Share Loss",
              "quickEdit": false,
              "name": "share",
              "width": 80,
              "fixed": "right",
              "id": "u:8a8c56163989",
              "placeholder": "-"
            },
            {
              "groupName": "TPRB Share Loss",
              "en-US": {
                "label": "This Paid Loss after AAD"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "tprbThisPaidLossAfterAad",
              "width": "",
              "fixed": "right",
              "id": "u:b23e69c85630",
              "label": "This Paid Loss after AAD",
              "placeholder": "-",
              "type": "input-number"
            },
            {
              "groupName": "TPRB Share Loss",
              "en-US": {
                "label": "O/S Loss Within Treaty Capacity"
              },
              "static": true,
              "quickEdit": false,
              "precision": 2,
              "name": "tprbOsWithinCapacity",
              "width": "",
              "fixed": "right",
              "id": "u:4c259933e967",
              "label": "O/S Loss Within Treaty Capacity",
              "placeholder": "-",
              "type": "input-number"
            }
          ],
          "minLength": 0,
          "itemActions": [
          ],
          "mode": "horizontal",
          "affixRow": [
            {
              "className": "",
              "id": "u:7d33ed0546b5",
              "text": "Total",
              "type": "text"
            },
            {
              "tpl": "-",
              "id": "u:8f9b344c40f8",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:totalPaidLoss|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:ac6d1bcdc919",
              "type": "tpl"
            },
            {
              "tpl": "${this100LossList|pick:preTotalPaidLoss|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:3939119ede55",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:thisPaidLossBeforeAad|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:7e2043743449",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:thisPaidLossAbsorbedByAad|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:962c79e86371",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:thisPaidLossAfterAad|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:7df3d29b8b5e",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:provOsLoss|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:12c3fc5020a5",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:osWithinCapacity|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:6ff062351906",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "——",
              "id": "u:2a235becaa1c",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "——",
              "id": "u:519f41704cac",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:tprbThisPaidLossAfterAad|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:c088978c9f8c",
              "placeholder": "",
              "type": "text"
            },
            {
              "tpl": "${this100LossList|pick:tprbOsWithinCapacity|sum|round:2|number}",
              "className": "block text-right pr-1",
              "id": "u:9db0413f094e",
              "placeholder": "",
              "type": "text"
            }
          ],
          "removable": false,
          "needConfirm": false,
          "placeholder": ""
        }
      ],
      "id": "u:0a0508ef6de5",
      "data": {
        "this100LossList": [
          {
            "layer": 1,
            "totalPaidLoss": 20000,
            "preTotalPaidLoss": 20000,
            "thisPaidLossBeforeAad": 20000,
            "thisPaidLossAbsorbedByAad": 20000,
            "thisPaidLossAfterAad": 20000,
            "provOsLoss": 20000,
            "osWithinCapacity": 20000,
            "acNo": "AC123456",
            "share": 56,
            "tprbThisPaidLossAfterAad": 20000,
            "tprbOsWithinCapacity": 20000
          },
          {
            "layer": 2,
            "totalPaidLoss": 30000,
            "preTotalPaidLoss": 30000,
            "thisPaidLossBeforeAad": 30000,
            "thisPaidLossAbsorbedByAad": 30000,
            "thisPaidLossAfterAad": 30000,
            "provOsLoss": 30000,
            "osWithinCapacity": 30000,
            "acNo": "AC123456",
            "share": 36,
            "tprbThisPaidLossAfterAad": 30000,
            "tprbOsWithinCapacity": 30000
          }
        ]
      }
    }
  ],
  "id": "u:44c38f4db26d"
}
  1. 操作步骤
    请简单描述一下复现的操作步骤...
@github-actions
Copy link

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

Please review the labels and make any necessary changes.

@2betop
Copy link
Collaborator

2betop commented Jul 26, 2023

先通过覆盖此样式来解决,后面修复发新版本

.cxd-Table-table > tbody > tr:active {background: #fff}

2betop added a commit to 2betop/amis that referenced this issue Jul 26, 2023
hsm-lv added a commit that referenced this issue Jul 27, 2023
style: tr 的active 样式调整 close: #7585
nwind pushed a commit to nwind/amis that referenced this issue Jul 27, 2023
2betop added a commit that referenced this issue Aug 1, 2023
* feat: 新增 amis-render 组件, 用于渲染数据里的 amis 配置

* type 改名为 amis

* 更新 snapshot

* 修复 snapshot 报错

* fix:input-table删除行记录动作问题

* feat: 范围类组件支持 extraName 拆成两个字段 (#7583)

* style: tr 的active 样式调整 close: #7585

* docs: 更新 React 官网链接

* docs: 添加 position 默认值示意 (#7592)

* chore:调用组件动作时找不到则throw Error

* feat: 新增 amis render 渲染组件

---------

Co-authored-by: lvxiaojiao <lvxiaojiao@baidu.com>
Co-authored-by: liaoxuezhi <2betop.cn@gmail.com>
Co-authored-by: liaoxuezhi <liaoxuezhi@icloud.com>
Co-authored-by: YangQi <yangfong2022@qq.com>
Co-authored-by: Allen <yupeng.fe@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants