48 lines
		
	
	
		
			865 B
		
	
	
	
		
			Markdown
		
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			865 B
		
	
	
	
		
			Markdown
		
	
	
| 
 | |
| <cn>
 | |
| #### ้่ๅทฒ้ๆฉ้้กน
 | |
| ้่ไธๆๅ่กจไธญๅทฒ้ๆฉ็้้กนใ
 | |
| </cn>
 | |
| 
 | |
| <us>
 | |
| #### Hide Already Selected
 | |
| Hide already selected options in the dropdown.
 | |
| </us>
 | |
| 
 | |
| ```html
 | |
| <template>
 | |
|   <a-select
 | |
|     mode="multiple"
 | |
|     placeholder="Inserted are removed"
 | |
|     :value="selectedItems"
 | |
|     @change="handleChange"
 | |
|     style="width: 100%"
 | |
|   >
 | |
|     <a-select-option v-for="item in filteredOptions" :key="item" :value="item">
 | |
|       {{item}}
 | |
|     </a-select-option>
 | |
|   </a-select>
 | |
| </template>
 | |
| <script>
 | |
| const OPTIONS = ['Apples', 'Nails', 'Bananas', 'Helicopters'];
 | |
| export default {
 | |
|   data() {
 | |
|     return {
 | |
|       selectedItems: [],
 | |
|     }
 | |
|   },
 | |
|   computed: {
 | |
|     filteredOptions() {
 | |
|       return OPTIONS.filter(o => !this.selectedItems.includes(o));
 | |
|     }
 | |
|   },
 | |
|   methods: {
 | |
|     handleChange(selectedItems) {
 | |
|       this.selectedItems = selectedItems
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| ```
 | |
| 
 |