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

[table] rowspanAndColspan合并行诡异的的问题 #4642

Open
lhdhtrc opened this issue Oct 11, 2024 · 3 comments
Open

[table] rowspanAndColspan合并行诡异的的问题 #4642

lhdhtrc opened this issue Oct 11, 2024 · 3 comments
Labels
need reproduce need to reproduce this issue with sandbox or code

Comments

@lhdhtrc
Copy link

lhdhtrc commented Oct 11, 2024

tdesign-vue-next 版本

1.10.2

重现链接

No response

重现步骤

1、只有第一列合并,尽量使用更多的数据合并更多的行
2、然后会发现某个合并行后面会莫名丢失第一列

const rows = document.querySelectorAll('#table .t-table__body tr');
table.value.forEach((item, ii) => {
    if (item.group_index === 0) {
      const td = rows[ii].querySelector('td:first-child');
      if (td) {
        td.setAttribute('rowspan', item.children.length);
      }
      if (ii + item.children.length === table.value.length) {
        rows[ii].classList.add('merge-last-row');
      }
      for (let i = 1; i < item.children.length; i++) {
        rows[ii + i].removeChild(rows[ii + i].querySelector('td:first-child'));
        rows[ii + i].classList.add('merge-row');
      }
    }
  });

目前我只能手动这样去处理

期望结果

正常合并行并且不会莫名奇妙丢失列

实际结果

无法正常合并相同第一列的行合并

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @lhdhtrc,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn
Copy link
Collaborator

uyarn commented Oct 11, 2024

需要给下复现的代码

@uyarn uyarn added the need reproduce need to reproduce this issue with sandbox or code label Oct 11, 2024
Copy link
Contributor

你好 @lhdhtrc, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need reproduce need to reproduce this issue with sandbox or code
Projects
None yet
Development

No branches or pull requests

2 participants