Merge pull request #6263 from musishui/2.0
fixed: 级联组件data中value类型非字符串时,筛选时无法选中筛选的项
This commit is contained in:
commit
ad4558fba3
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue