element
element copied to clipboard
[Bug Report] el-tree的勾选框在禁选和不禁选时表现不一致
Element UI version
2.15.14
OS/Browsers version
window/chrome
Vue version
2.7.16
Reproduction Link
https://codepen.io/aique127/pen/OJePKxd
Steps to reproduce
当default-checked-keys属性含有某个父节点和其部分子节点的key时,checkbox会发生如下不一致的情况:
1、当disabled属性为true时,父节点的checkbox是半选状态,子节点包含在default-checked-keys中的是全选状态、不包含在内的是未选状态。
2、当disabled属性为false时,父节点的checkbox是全选状态,子节点全部都是全选状态。
这种情况在实际业务中很让人疑惑甚至出现bug,比如我本来父节点和子节点都是全选的,我新增一个未选的子节点后父节点应该变成半选状态才对,但实际上父节点和新增的子节点都变成了全选。
What is Expected?
上述第1 种。
What is actually happening?
根据disabled属性的不同有不同的勾选状态。
看setChecked方法的源码,是因为受到了passValue参数影响,能否将这个属性去掉呢?
@wangdaodao @webvs2 大佬们,如果不是一个bug,给一个合理的解释也行。。。
@wangdaodao @webvs2 大佬们,如果不是一个bug,给一个合理的解释也行。。。
我感觉算是一个bug,禁用和非禁用情况下,表现应该要保持一致。
I will check this issue in the near future, and I am sorry that I have no time to pay attention to it
Can I also offer pr on this release @aique127 https://github.com/webvs2/element
Can I also offer pr on this release @aique127 https://github.com/webvs2/element
大佬,我已经提了一个,看看可以吗 https://github.com/ElemeFE/element/pull/22921
I can sync the past, but the change of the problem is currently in the lts version to fix. For the release information, see this #22741
I can sync the past, but the change of the problem is currently in the lts version to fix. For the release information, see this #22741
你好,官方版本不再更新了吗,以后都会更新到elementui-lts?
I can sync the past, but the change of the problem is currently in the lts version to fix. For the release information, see this #22741
你好,官方版本不再更新了吗,以后都会更新到elementui-lts?
For now, the official update frequency is slow, so extending a version with a higher hot update frequency, I recommend using lts
请问elementui-lts的源码在哪里可以获取?
Same here, any updates?