Commit 78824cc259637dbc51a12d111652d440f9510ef8

Authored by ้ƒ‘ๆ•
1 parent fdc71ffe

fixed #3817 that the default value does't display bug.

Showing 1 changed file with 2 additions and 1 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.key);
  354 + let hasDefaultSelected = slotOptions.some(option => this.query === option.componentOptions.propsData.value);
355 355 for (let option of slotOptions) {
356 356  
357 357 const cOptions = option.componentOptions;
... ... @@ -426,6 +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 430 return initialValue.filter((item) => {
430 431 return Boolean(item) || item === 0;
431 432 });
... ...