ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[bug report] when there are disabled nodes in El tree, select all (top node) to select the disabled node, but select its child node to select the disabled node; #21126

Open qd-pangyongkang opened 3 years ago

qd-pangyongkang commented 3 years ago

Element UI version

2.15.3

OS/Browsers version

win10 版本20H2/chrome 版本 91.0.4472.124(正式版本) (64 位)

Vue version

2.6.14

Reproduction Link

https://codepen.io/qd-pangyongkang/pen/eYWZvVX?editors=1111

Steps to reproduce

当二级存在禁用时,选择第一级全选,无法选中二级禁用的选项,但是选择其全部三级子项,可以选中二级,并且此时操作全选,无法控制该三级子项

When the second level is disabled, select the first level to be all selected, and the second-level disabled option cannot be selected, but select all the third-level subitems, and the second level can be selected, and the operation is all selected at this time, and the third-level subitems cannot be controlled

What is Expected?

选择全选时,将树所有节点选中 When selecting All, select all nodes of the tree

What is actually happening?

选择全选时,存在“非禁用状态的子级”的父级无法被选中 When you select all, a parent with a "child in a non-disabled state" cannot be selected

element-bot commented 3 years ago

Translation of this issue:

Element UI version

2.15.3

OS/Browsers version

Win10 version 20h2 / Chrome version 91.0.4472.124 (official version) (64 bit)

Vue version

2.6.14

Reproduction Link

https://codepen.io/qd-pangyongkang/pen/eYWZvVX?editors=1111

Steps to reproduce

When the level 2 is disabled, select level 1 select all, and the level 2 disabled option cannot be selected. However, if you select all the level 3 children, you can select Level 2, and select all at this time, and you cannot control the level 3 children

When the second level is disabled, select the first level to be all selected, and the second-level disabled option cannot be selected, but select all the third-level subitems, and the second level can be selected, and the operation is all selected at this time, and the third-level subitems cannot be controlled

What is Expected?

When select all, all nodes in the tree will be selected When selecting All, select all nodes of the tree

What is actually happening?

When select all, the parent with non disabled child cannot be selected

When you select all, a parent with a \"child in a non-disabled state\" cannot be selected

wangdaodao commented 3 years ago

规则貌似是子集有禁用的,父级是无法控制