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

[Dropdown] t-dropdown-item 为空时报错 #4773

Closed
Hiram-Wong opened this issue Nov 23, 2024 · 1 comment
Closed

[Dropdown] t-dropdown-item 为空时报错 #4773

Hiram-Wong opened this issue Nov 23, 2024 · 1 comment
Labels
🐞 bug Something isn't working to be published to be published

Comments

@Hiram-Wong
Copy link

tdesign-vue-next 版本

1.10.4

重现链接

No response

重现步骤

<t-dropdown placement="bottom" :max-height="250">
  <t-button size="small" theme="default" variant="text" auto-width>
    <span class="title">xxxxx</span>
    <template #suffix>
      <chevron-down-icon size="16" />
    </template>
  </t-button>
  <t-dropdown-menu>
  </t-dropdown-menu>
</t-dropdown>

期望结果

scrollHeight应该为 0

实际结果

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'scrollHeight')
    at tdesign-vue-next.js?v=994d0f1c:102531:91
    at chunk-P7XL4HGA.js?v=994d0f1c:10192:44
    at callWithErrorHandling (chunk-P7XL4HGA.js?v=994d0f1c:2480:19)
    at callWithAsyncErrorHandling (chunk-P7XL4HGA.js?v=994d0f1c:2487:17)
    at hook.__weh.hook.__weh (chunk-P7XL4HGA.js?v=994d0f1c:4388:19)
    at flushPostFlushCbs (chunk-P7XL4HGA.js?v=994d0f1c:2657:28)
    at flushJobs (chunk-P7XL4HGA.js?v=994d0f1c:2698:5)

scrollHeight获取不到

框架版本

3.5.13

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

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

@uyarn uyarn added the 🐞 bug Something isn't working label Nov 27, 2024
@uyarn uyarn added the to be published to be published label Nov 28, 2024
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