Commit 4403f97d4484dacc0f298731d521d61cf8558e38

Authored by ้ƒ‘ๆ•
1 parent 78824cc2

fixed when selector is multiple mode error.

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/components/select/select.vue
... ... @@ -351,7 +351,7 @@
351 351 });
352 352 });
353 353 }
354   - let hasDefaultSelected = slotOptions.some(option => this.query === option.componentOptions.propsData.value);
  354 + let hasDefaultSelected = slotOptions.some(option => this.query === option.key);
355 355 for (let option of slotOptions) {
356 356  
357 357 const cOptions = option.componentOptions;
... ... @@ -426,7 +426,7 @@
426 426 const {multiple, value} = this;
427 427 let initialValue = Array.isArray(value) ? value : [value];
428 428 if (!multiple && (typeof initialValue[0] === 'undefined' || (String(initialValue[0]).trim() === '' && !Number.isFinite(initialValue[0])))) initialValue = [];
429   - if (this.remote && this.value) this.query = value;
  429 + if (this.remote && this.value) this.query = Array.isArray(value) ? "" : value;
430 430 return initialValue.filter((item) => {
431 431 return Boolean(item) || item === 0;
432 432 });
... ...