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] table COLUMNS 中 title 和 colKey 的属性名一致 插槽会报错读取不到对应 colKey 属性 #4646

Open
zhyblack opened this issue Oct 13, 2024 · 1 comment

Comments

@zhyblack
Copy link

zhyblack commented Oct 13, 2024

tdesign-vue-next 版本

1.9.9

重现链接

No response

重现步骤

{
    title: 'createTime',
    colKey: 'createTime',
  },
<template #createTime="{ col, row }">
        {{ row[col.colKey] }}
      </template>

期望结果

正常输出 经过测试 只要 title colKey 属性值不一致 就是正常的

实际结果

index.vue:39 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'createTime')
at index.vue:39:33
at Proxy.renderFnWithContext (runtime-core.esm-bundler.js:774:13)
at renderTitle (useTableHeader.tsx:18:22)
at thead.tsx:161:27
at Array.map ()
at thead.tsx:124:27
at Array.map ()
at renderThNodeList2 (thead.tsx:123:26)
at Proxy.render30 (thead.tsx:223:10)
at renderComponentRoot (runtime-core.esm-bundler.js:834:16)

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

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

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

No branches or pull requests

1 participant