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

根据data中的属性,隐藏checkbox #25

Closed
hu2014 opened this issue Apr 3, 2023 · 7 comments
Closed

根据data中的属性,隐藏checkbox #25

hu2014 opened this issue Apr 3, 2023 · 7 comments
Labels
wontfix This will not be worked on

Comments

@hu2014
Copy link

hu2014 commented Apr 3, 2023

大佬,我想实现根据数据中的某个属性,决定是否展示checkbox,怎么弄啊。比如图片中,不想要通道的checkbo展示出来。这个树的层级不定,可能会嵌套很深。
image

@wchbrad
Copy link
Owner

wchbrad commented Apr 3, 2023

使用render-content自定义内容,check-box根据data属性的需要渲染

@hu2014
Copy link
Author

hu2014 commented Apr 3, 2023 via email

@wchbrad
Copy link
Owner

wchbrad commented Apr 3, 2023

或者你可以在需要不展示的节点使用disabledCheckbox: true,这个会是该节点不可选,但是会显示灰色的checkbox框

@hu2014
Copy link
Author

hu2014 commented Apr 3, 2023 via email

@wchbrad
Copy link
Owner

wchbrad commented Apr 4, 2023

check-strictly="true"可以解决父节点不能选择的问题,但不能全选,推荐还是使用render-content然后自实现checkbox的选中和取消选中方法

@hu2014
Copy link
Author

hu2014 commented Apr 4, 2023 via email

@hu2014
Copy link
Author

hu2014 commented Apr 4, 2023 via email

@wchbrad wchbrad closed this as completed Apr 11, 2023
@wchbrad wchbrad added the wontfix This will not be worked on label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants