element ui 下拉表格多选框
时间: 2023-08-27 17:04:49 浏览: 115
对于element-ui下拉表格多选框的问题,可以通过以下步骤来解决。首先,在表格中的el-table-column中添加属性type="selection"来实现多选框的显示。其次,为了解决默认值不可删除的问题,可以在el-select中添加属性reserve-selection="true",这样在数据更新之后会保留之前选中的数据。最后,通过在toggleSelection方法中调用this.$refs.multipleTable.toggleRowSelection(row)来实现勾选和取消勾选的功能。如果需要清除所有勾选项,可以调用this.$refs.multipleTable.clearSelection()方法。这样就可以解决element-ui下拉表格多选框的问题了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Element-UI表格多选框与tags联动](https://blog.csdn.net/weixin_42823060/article/details/120413321)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [解决element-ui里的下拉多选框 el-select 时,默认值不可删除问题](https://download.csdn.net/download/weixin_38596093/12924091)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文