fixed when selector is multiple mode error.
This commit is contained in:
parent
78824cc259
commit
4403f97d44
1 changed files with 2 additions and 2 deletions
|
@ -351,7 +351,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let hasDefaultSelected = slotOptions.some(option => this.query === option.componentOptions.propsData.value);
|
let hasDefaultSelected = slotOptions.some(option => this.query === option.key);
|
||||||
for (let option of slotOptions) {
|
for (let option of slotOptions) {
|
||||||
|
|
||||||
const cOptions = option.componentOptions;
|
const cOptions = option.componentOptions;
|
||||||
|
@ -426,7 +426,7 @@
|
||||||
const {multiple, value} = this;
|
const {multiple, value} = this;
|
||||||
let initialValue = Array.isArray(value) ? value : [value];
|
let initialValue = Array.isArray(value) ? value : [value];
|
||||||
if (!multiple && (typeof initialValue[0] === 'undefined' || (String(initialValue[0]).trim() === '' && !Number.isFinite(initialValue[0])))) initialValue = [];
|
if (!multiple && (typeof initialValue[0] === 'undefined' || (String(initialValue[0]).trim() === '' && !Number.isFinite(initialValue[0])))) initialValue = [];
|
||||||
if (this.remote && this.value) this.query = value;
|
if (this.remote && this.value) this.query = Array.isArray(value) ? "" : value;
|
||||||
return initialValue.filter((item) => {
|
return initialValue.filter((item) => {
|
||||||
return Boolean(item) || item === 0;
|
return Boolean(item) || item === 0;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue