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

[Cascader] 级联选择器 支持 readonly 时该项没有选择框 #4187

Closed
linzhenjie opened this issue May 12, 2024 · 2 comments
Closed
Labels
usage the issue about component usage

Comments

@linzhenjie
Copy link

这个功能解决了什么问题

image

你建议的方案是什么

image 由于父级别分类不可勾选,建议支持 option 单项设置readonly:true 来控制checkbox隐藏
Copy link
Contributor

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

@uyarn uyarn added the 💪🏻 enhancement New feature or request label May 12, 2024
@uyarn
Copy link
Collaborator

uyarn commented May 24, 2024

讨论了下 readonly 并不合适这样使用 交互和视觉上也不合适
如果只是为了禁止功能选中,可以通过配置disabled,
如果为了保证父级不可选中,可以通过指定层级隐藏选项框的方式实现,参考这个示例
https://codesandbox.io/p/devbox/vgvcy3?file=%2Fsrc%2Fdemo.vue%3A64%2C39-64%2C40

@uyarn uyarn added usage the issue about component usage and removed 💪🏻 enhancement New feature or request labels May 24, 2024
@uyarn uyarn closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage the issue about component usage
Projects
None yet
Development

No branches or pull requests

2 participants