From 4d0a15694f419c5cd900b424ee2fcd395b640dc7 Mon Sep 17 00:00:00 2001 From: myronliu347 Date: Wed, 20 Nov 2019 11:10:53 +0800 Subject: [PATCH 1/2] temp(Cascader): add change default indeterminate --- src/cascader/cascader.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cascader/cascader.jsx b/src/cascader/cascader.jsx index c0d5bfb70d..697b6d3b4f 100644 --- a/src/cascader/cascader.jsx +++ b/src/cascader/cascader.jsx @@ -731,9 +731,10 @@ export default class Cascader extends Component { props.checkable = !(canOnlyCheckLeaf && canExpand); props.checked = value.indexOf(item.value) > -1; props.indeterminate = - checkStrictly || canOnlyCheckLeaf + (checkStrictly || canOnlyCheckLeaf ? false - : this.indeterminate.indexOf(item.value) > -1; + : this.indeterminate.indexOf(item.value) > + -1) || !!item.indeterminate; props.checkboxDisabled = !!item.checkboxDisabled; props.onCheck = this.handleCheck.bind(this, item.value); } else { From 4a12b265890f68be4c27a69b85304960b4276eee Mon Sep 17 00:00:00 2001 From: myronliu347 Date: Wed, 20 Nov 2019 11:15:20 +0800 Subject: [PATCH 2/2] temp(*): add cascader item checked --- src/cascader/cascader.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cascader/cascader.jsx b/src/cascader/cascader.jsx index 697b6d3b4f..e7cf74382e 100644 --- a/src/cascader/cascader.jsx +++ b/src/cascader/cascader.jsx @@ -729,7 +729,8 @@ export default class Cascader extends Component { if (multiple) { props.checkable = !(canOnlyCheckLeaf && canExpand); - props.checked = value.indexOf(item.value) > -1; + props.checked = + value.indexOf(item.value) > -1 || !!item.checked; props.indeterminate = (checkStrictly || canOnlyCheckLeaf ? false