el-select includes
时间: 2023-10-15 08:25:23 浏览: 65
el-select 做联级筛选(包含其他功能点)
在Vue.js的el-select组件中,includes是一个数组方法,用于判断一个数组是否包含指定的元素。在代码引用中,使用includes方法判断enterpriseIds数组是否包含item.id,如果包含,则将el-option设置为disabled,即禁止操作和删除。这样可以实现在el-select中已选择的项不可删除和操作的效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [【记录】el-select 已选项禁止删除 el-select编辑时已选择的项不允许删除](https://blog.csdn.net/qq_41287158/article/details/125299972)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文