You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
发现的另一个问题,如果我不使用自定义的名称,直接使用文档的用法,即:slots:{title: 'title'},那么前提是这个节点下没有 title 属性才能使用 title 插槽,我认为 title 本身作为默认属性用来展示名称,那么我在使用插槽的时候一定是需要自定义内容的,此时插槽的优先级理应高于默认属性 title
Version
2.2.2
Environment
vue 3.1.5
Reproduction link
Steps to reproduce
tree-select 组件无法自定义 title 插槽名称
在使用 treeData 的方式时,我定义
node.slots={title:"custom"}
,并使用插槽:控制台会出现报错:
Uncaught (in promise) TypeError: $slots.title is not a function
What is expected?
能够正常使用插槽
What is actually happening?
控制台会出现报错:
Uncaught (in promise) TypeError: $slots.title is not a function
slots: true
就可以了slots:{title: 'title'}
,那么前提是这个节点下没有 title 属性才能使用 title 插槽,我认为 title 本身作为默认属性用来展示名称,那么我在使用插槽的时候一定是需要自定义内容的,此时插槽的优先级理应高于默认属性 title我的业务场景:在某父级组件中处理出来需要使用的 treeData,并向下注入,多处需要使用,但有的地方需要使用插槽自定义内容,有的不需要,上面两个问题导致我不能使用同一数据,必须处理成两份数据,一个是有插槽的,一个是没插槽的
The text was updated successfully, but these errors were encountered: