Cascader: fix unexpected error (#21759)

Co-authored-by: louie <liguanzhi@youxin.cloud>
This commit is contained in:
louiebb 2022-06-02 18:00:00 +08:00 committed by GitHub
parent 13ef966487
commit 934826c177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,6 +136,10 @@ export default {
}, },
watch: { watch: {
value() {
this.syncCheckedValue();
this.checkStrictly && this.calculateCheckedNodePaths();
},
options: { options: {
handler: function() { handler: function() {
this.initStore(); this.initStore();
@ -143,10 +147,6 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
}, },
value() {
this.syncCheckedValue();
this.checkStrictly && this.calculateCheckedNodePaths();
},
checkedValue(val) { checkedValue(val) {
if (!isEqual(val, this.value)) { if (!isEqual(val, this.value)) {
this.checkStrictly && this.calculateCheckedNodePaths(); this.checkStrictly && this.calculateCheckedNodePaths();