vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

Home Page:https://antdv.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

archiesong opened this issue · comments

  • 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

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

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