refactoring
This commit is contained in:
		@@ -897,10 +897,10 @@ export default {
 | 
				
			|||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        if (is_string) {
 | 
					                    if (is_string) {
 | 
				
			||||||
                            this.selected = pre_value;
 | 
					                        this.selected = pre_value;
 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@@ -1030,14 +1030,16 @@ export default {
 | 
				
			|||||||
                    if (this.multiple) {                        
 | 
					                    if (this.multiple) {                        
 | 
				
			||||||
                        let selected = this.selected;                        
 | 
					                        let selected = this.selected;                        
 | 
				
			||||||
                        this.selected = [];
 | 
					                        this.selected = [];
 | 
				
			||||||
 | 
					                        
 | 
				
			||||||
                        selected.forEach(function (select, index)  {
 | 
					                        if (selected !== undefined) {
 | 
				
			||||||
                            if (this.sorted_options.find(option => option.key == select)) {  
 | 
					                            selected.forEach(function (select, index)  {
 | 
				
			||||||
                                this.selected.push(select);
 | 
					                                if (this.sorted_options.find(option => option.key == select)) {  
 | 
				
			||||||
                            } else {
 | 
					                                    this.selected.push(select);
 | 
				
			||||||
                                this.selected = [];
 | 
					                                } else {
 | 
				
			||||||
                            }
 | 
					                                    this.selected = [];
 | 
				
			||||||
                        }, this);
 | 
					                                }
 | 
				
			||||||
 | 
					                            }, this);
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        if (! options.find(option => option == this.selected)) {
 | 
					                        if (! options.find(option => option == this.selected)) {
 | 
				
			||||||
                            this.selected = [];
 | 
					                            this.selected = [];
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user