The role of the indeterminate attribute of checkbox in elementUI

This is explained on the elementUI official website: setting the indeterminate state is only responsible for style control.

It is used with v-model="checkAll" to change the style of the box in front of "select all"

indeterminate represents an uncertain state of the multi-select box.
true represents: neither all selected nor all unselected. It represents an uncertain state.
false represents: either all selected or all unselected. represents a certain state

So, how do indeterminate and checkAll determine the style of the box in front of "select all"?

for example:

indeterminate checkAll style
true true -
true false -
false true
false false none

[The first two are shown in the figure]


Insert image description here


[The third type is shown in the picture]


Insert image description here


[The fourth type is shown in the picture]


Insert image description here


Guess you like

Origin blog.csdn.net/QinLaoDeMaChu/article/details/127652111