Skip to content

Table组件 headerCell 插槽与expandedRowRender插槽一起使用时报错, 无法渲染 #7115

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

Closed
1 task done
ryne6 opened this issue Nov 16, 2023 · 11 comments
Closed
1 task done

Comments

@ryne6
Copy link
Contributor

ryne6 commented Nov 16, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.7

Environment

4.0.7

Reproduction link

Edit on CodeSandbox

Steps to reproduce

见sandBox

What is expected?

正常渲染

What is actually happening?

sandBox

@ryne6
Copy link
Contributor Author

ryne6 commented Nov 16, 2023

注释掉headerCell插槽或expandedRowRender插槽之一 可正常渲染

@tangjinzhou
Copy link
Member

sandBox 没有示例啊

@ryne6
Copy link
Contributor Author

ryne6 commented Dec 18, 2023

sandBox 没有示例啊

不好意思, 重新整了一个: https://codesandbox.io/p/devbox/happy-shadow-wsd7l7?file=%2Fsrc%2FApp.vue%3A45%2C16
现在进去是报错的, 注释掉headerCell插槽或者expandedRowRender插槽可正常渲染 @tangjinzhou

@sunny-ali
Copy link

I have the same problem ant-design-vue version 4.1.0

@think-gem
Copy link

I have the same problem ant-design-vue version 4.1.1、vue 3.4.15、vite 5.0.12

example:

<a-table
  :columns="[]"
  :dataSource="[{},{},{}]"
  :pagination="false"
>
  <template #headerCell="{ title }">
    {{ title }}
  </template>
  <template #expandedRowRender="{ record }">
    {{ record }}
  </template>
</a-table>

click expand button, tip error:

runtime-core.esm-bundler.js:2952 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE')
    at renderSlot (runtime-core.esm-bundler.js:2952:32)
    at useColumns.js:24:27
    at Array.map (<anonymous>)
    at fillSlots (useColumns.js:8:18)
    at filledColumns (useColumns.js:36:36)
    at ComputedRefImpl.transformColumns [as _value] (Table.js:338:113)
    at useColumns.js:175:39
    at ReactiveEffect.fn (reactivity.esm-bundler.js:992:13)
    at ReactiveEffect.run (reactivity.esm-bundler.js:176:19)
    at get value [as value] (reactivity.esm-bundler.js:1003:61)

@tangjinzhou

@think-gem
Copy link

image @tangjinzhou 使用npm和yarn提示错误不同,npm不渲染,yarn渲染后点击加号提示错误,示例地址:https://codesandbox.io/p/devbox/quizzical-morse-9vxgyw?file=%2Fsrc%2FApp.vue&embed=1

@ryne6
Copy link
Contributor Author

ryne6 commented Jan 27, 2024

已经有大佬改了,等更新版本就好了 @think-gem @sunny-ali

@ryne6 ryne6 closed this as completed Jan 27, 2024
@hushuaibo
Copy link

hushuaibo commented Apr 9, 2024

升级到哪个版本会不再出现这个问题呢,目前"ant-design-vue": "^3.2.0","vue": "^3.2.33" @bsuooo

@ryne6
Copy link
Contributor Author

ryne6 commented Apr 9, 2024

升级到哪个版本会不再出现这个问题呢,目前"ant-design-vue": "^3.2.0","vue": "^3.2.33" @bsuooo

4.1.2

@ewoudwerkman
Copy link

any update? I'm experiencing the same issue with code upgraded from antdv 2.x

@ZedCoding
Copy link

我的antdv是 3.2.20 能不升级嘛

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

Successfully merging a pull request may close this issue.

7 participants