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

Typography 排版 组件使用时 同时设置 copyable 跟 ellipsis 会出现警告 Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead. #7552

Open
1 task
archiesong opened this issue May 4, 2024 · 2 comments

Comments

@archiesong
Copy link

archiesong commented May 4, 2024

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

Version

4.1.0

Environment

vue 3.4.23

Reproduction link

https://www.antdv.com/components/typography-cn#api

Steps to reproduce

在项目中使用Typography 组件

What is expected?

浏览器控制台没有 Vue Warn 警告 提示

What is actually happening?

[Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.
at
at

QQ截图20240505030728
QQ截图20240505030752

@Jiachenglong2518
Copy link

同样遇到了,请问解决了吗

@archiesong
Copy link
Author

archiesong commented May 29, 2024

image
检查Typography 组件 源码 发现在onMounted生命周期里面调用了 syncEllipsis 方法 这个方法中使用了slots 所以会报这个警告,注释掉这个方法就不会有警告, 而且功能正常,希望作者能在下个版本更新能修复这个问题

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

2 participants