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] 多表头下50列报错,Uncaught (in promise) RangeError: Invalid array length #713

Closed
SuxueCode opened this issue May 6, 2022 · 7 comments
Assignees
Labels
🐞 bug Something isn't working to be published to be published

Comments

@SuxueCode
Copy link

tdesign-vue-next 版本

0.14.0

重现链接

https://stackblitz.com/edit/angular-btrd1t-49wcec?file=src%2Fdemo.vue

重现步骤

下面动态生成列,for循环内,23可以,24不行,只有多表头有这个问题,单表头100列都没问题
const Columns = ref([
{
title: '物料代码',
align: 'center',
verticalAlign: 'middle',
width: 140,
colKey: 'FNumber',
fixed: 'left',
},
{
title: '物料名称',
align: 'center',
verticalAlign: 'middle',
width: 200,
colKey: 'FName',
fixed: 'left',
filter: {
type: 'input',
props: { placeholder: '输入关键词过滤' },
// 是否显示重置取消按钮,一般情况不需要显示
showConfirmAndReset: true,
},
},
]);
//23前可以,24后不行
for (let i = 1; i <= 24; i++) {
Columns.value.push({
title: i.toString(),
align: 'center',
colKey: c${i.toString()},
children: [
{
title: '入',
align: 'center',
width: 90,
colKey: ci${i.toString()},
},
{
title: '出',
align: 'center',
width: 90,
colKey: co${i.toString()},
},
],
});
}

期望结果

const Columns = ref([
{
title: '物料代码',
align: 'center',
verticalAlign: 'middle',
width: 140,
colKey: 'FNumber',
fixed: 'left',
},
{
title: '物料名称',
align: 'center',
verticalAlign: 'middle',
width: 200,
colKey: 'FName',
fixed: 'left',
filter: {
type: 'input',
props: { placeholder: '输入关键词过滤' },
// 是否显示重置取消按钮,一般情况不需要显示
showConfirmAndReset: true,
},
},
]);
//23前可以,24后不行
for (let i = 1; i <= 24; i++) {
Columns.value.push({
title: i.toString(),
align: 'center',
colKey: c${i.toString()},
children: [
{
title: '入',
align: 'center',
width: 90,
colKey: ci${i.toString()},
},
{
title: '出',
align: 'center',
width: 90,
colKey: co${i.toString()},
},
],
});
}

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

♥️ 有劳 @realyuyanan @Louiszhai @PengYYYYY @chaishi 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @BeatenMo 。

@PengYYYYY PengYYYYY added the 🐞 bug Something isn't working label May 6, 2022
@chaishi
Copy link
Collaborator

chaishi commented May 10, 2022

打开看不到代码

image

@SuxueCode
Copy link
Author

@chaishi chaishi added the 🏃 in progress someone is developing label May 13, 2022
@chaishi chaishi changed the title [table] 多表头下50列报错 [table] 多表头下50列报错,Uncaught (in promise) RangeError: Invalid array length May 13, 2022
chaishi added a commit to chaishi/tdesign-vue-next that referenced this issue May 13, 2022
@chaishi
Copy link
Collaborator

chaishi commented May 13, 2022

resolved in #770

image

@chaishi
Copy link
Collaborator

chaishi commented May 13, 2022

已将 Vue2/Vue3/React 等 3 个框架同步修复

@chaishi chaishi added to be published to be published and removed 🏃 in progress someone is developing labels May 13, 2022
This was referenced May 14, 2022
@PengYYYYY
Copy link
Collaborator

0.14.2 已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working to be published to be published
Projects
None yet
Development

No branches or pull requests

3 participants