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

[TreeSelect] 自定义keys,选中项是变色的,但input框内是无label的。 #3724

Open
Coding-Journey-Studio opened this issue Dec 9, 2023 · 6 comments

Comments

@Coding-Journey-Studio
Copy link

tdesign-vue-next 版本

1.7.1

重现链接

No response

重现步骤

image
image
可以正常打印出value,就是label无法显示。tree上能很明显的选中状态

期望结果

可以正常使用

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

github-actions bot commented Dec 9, 2023

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

Copy link
Contributor

github-actions bot commented Dec 9, 2023

♥️ 有劳 @Godlike-meteor 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @travelCN 。

@zhaodesen
Copy link
Contributor

这不是一个bug, :keys="{ value: 'menuId', label: 'meta.title' }" 中 "'meta.title" 会被当成对象的属性来设置 "label" 的值, 就像这样:
label = menusTree['meta.title'], 而不是 label = menusTree.meta.title, 所以,你可以把 title 放到 与 menuId 同一层级里,这样就能正常显示了

@Coding-Journey-Studio
Copy link
Author

已经按照你们的格式修改好了,因为如果用在菜单使用上,必然会有嵌套。能兼容支持是最好的。

@zhaodesen
Copy link
Contributor

我不是他们团队的, 我是看了一下源码,才知道没有处理这块,我已经提了pr,用来兼容支持嵌套的形式,不过他们还没有回应

@Coding-Journey-Studio
Copy link
Author

感谢。我是感觉文档不是很清晰。

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