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

Tree组件中,treeNode配置scopedSlots: { icon: 'icon' },无法获取icon插槽的slot-scope值 #1711

Closed
biterabbit opened this issue Jan 13, 2020 · 7 comments

Comments

@biterabbit
Copy link
Contributor

Version
1.4.10

Environment
win10 1809,chrome 78 ,vue 2.5.2

Reproduction link
https://biterabbit.github.io/ant-design-vue-demo/dist/index.html#/

Steps to reproduce
Tree组件中,treeNode配置scopedSlots: { icon: 'icon' }

What is expected?
可以获取icon插槽的slot-scope值

What is actually happening?
无法获取icon插槽的slot-scope值,返回了一个方法而不是数据

需要定制tree的图标时,具体的图标在treeNode的数据上,但现在无法获取icon处的插槽参数。经过查看ant-design-vue源码,发现Tree.jsx文件在icon处配置错误,希望能尽快修复

@tangjinzhou
Copy link
Member

没太懂你的意思 既然发现了问题,方便的话可以pr

@biterabbit
Copy link
Contributor Author

biterabbit commented Feb 6, 2020 via email

@tangjinzhou
Copy link
Member

并没有看到你提交的 pr

@biterabbit
Copy link
Contributor Author

biterabbit commented Feb 7, 2020 via email

@xxbld
Copy link

xxbld commented Jun 18, 2020

@tangjinzhou

请问tree 不支持全局的 scopedSlots吗?

<Tree
    treeData={data}
    showLine={true}
    showIcon={true}
    scopedSlots={{
        title: (title: string) => {
            return (<div>{title}1</div>)
        }
    }}
/>

@github-actions
Copy link

github-actions bot commented Jan 4, 2021

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants