File tree 5 files changed +10
-5
lines changed
5 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ Enter keywords and search data from server.
453
453
},
454
454
mounted () {
455
455
this .list = this .states .map (item => {
456
- return { value: item, label: item };
456
+ return { value: ` value: ${ item} ` , label: ` label: ${ item} ` };
457
457
});
458
458
},
459
459
methods: {
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ Introduzca palabras y datos para buscar desde el servidor.
457
457
},
458
458
mounted () {
459
459
this .list = this .states .map (item => {
460
- return { value: item, label: item };
460
+ return { value: ` value: ${ item} ` , label: ` label: ${ item} ` };
461
461
});
462
462
},
463
463
methods: {
Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ Vous pouvez aller chercher les options sur le serveur de manière dynamique.
453
453
},
454
454
mounted () {
455
455
this .list = this .states .map (item => {
456
- return { value: item, label: item };
456
+ return { value: ` value: ${ item} ` , label: ` label: ${ item} ` };
457
457
});
458
458
},
459
459
methods: {
Original file line number Diff line number Diff line change 448
448
},
449
449
mounted () {
450
450
this .list = this .states .map (item => {
451
- return { value: item, label: item };
451
+ return { value: ` value: ${ item} ` , label: ` label: ${ item} ` };
452
452
});
453
453
},
454
454
methods: {
Original file line number Diff line number Diff line change 153
153
},
154
154
155
155
beforeDestroy () {
156
+ const { selected , multiple } = this .select ;
157
+ let selectedOptions = multiple ? selected : [selected];
156
158
let index = this .select .cachedOptions .indexOf (this );
157
- if (index > - 1 ) {
159
+ let selectedIndex = selectedOptions .indexOf (this );
160
+
161
+ // if option is not selected, remove it from cache
162
+ if (index > - 1 && selectedIndex < 0 ) {
158
163
this .select .cachedOptions .splice (index, 1 );
159
164
}
160
165
this .select .onOptionDestroy (this .select .options .indexOf (this ));
You can’t perform that action at this time.
0 commit comments