diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index e088ec7a..d254724c 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -207,7 +207,7 @@ for (let i = 0; i < arr.length; i++) { let item = arr[i]; item.__label = label ? label + ' / ' + item.label : item.label; - item.__value = value ? value + ',' + item.value : item.value; + item.__value = value ? [...value, item.value] : [item.value]; if (item.children && item.children.length) { getSelections(item.children, item.__label, item.__value); @@ -276,7 +276,7 @@ this.currentValue = this.selected = this.tmpSelected = []; this.handleClose(); this.emitValue(this.currentValue, oldVal); -// this.$broadcast('on-clear'); + // this.$broadcast('on-clear'); this.broadcast('Caspanel', 'on-clear'); }, handleClose () { @@ -328,7 +328,7 @@ this.query = ''; this.$refs.input.currentValue = ''; const oldVal = JSON.stringify(this.currentValue); - this.currentValue = item.value.split(','); + this.currentValue = item.value; // use setTimeout for #4786, can not use nextTick, because @on-find-selected use nextTick setTimeout(() => { this.emitValue(this.currentValue, oldVal);