(value, deep)
| 260 | } |
| 261 | |
| 262 | setChecked(value, deep) { |
| 263 | this.indeterminate = value === 'half'; |
| 264 | this.checked = value === true; |
| 265 | |
| 266 | const handleDescendants = () => { |
| 267 | if (deep) { |
| 268 | const childNodes = this.childNodes; |
| 269 | for (let i = 0, j = childNodes.length; i < j; i++) { |
| 270 | const child = childNodes[i]; |
| 271 | child.setChecked(value !== false, deep); |
| 272 | } |
| 273 | } |
| 274 | }; |
| 275 | |
| 276 | if (!this.store.checkStrictly && this.shouldLoadData()) { |
| 277 | // Only work on lazy load data. |
| 278 | this.loadData(() => { |
| 279 | handleDescendants(); |
| 280 | }, { |
| 281 | checked: value !== false |
| 282 | }); |
| 283 | } else { |
| 284 | handleDescendants(); |
| 285 | } |
| 286 | |
| 287 | const parent = this.parent; |
| 288 | if (!parent || parent.level === 0) return; |
| 289 | |
| 290 | if (!this.store.checkStrictly) { |
| 291 | reInitChecked(parent); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | getChildren() { // this is data |
| 296 | const data = this.data; |
no test coverage detected