el-checkbox默认选择
时间: 2023-10-01 09:08:30 浏览: 111
el-checkbox默认选择可以通过设置v-model的值来实现。在引用\[1\]中的代码中,v-model="role.permission"表示将role.permission作为数据绑定到el-checkbox-group组件上。如果role.permission的值为true,则el-checkbox会默认选中;如果role.permission的值为false,则el-checkbox不会默认选中。因此,可以通过设置role.permission的初始值来控制el-checkbox的默认选择状态。
#### 引用[.reference_title]
- *1* [element UI checkbox,通过后台传来的数据默认选中](https://blog.csdn.net/lolhuxiaotian/article/details/123656267)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [el-table 复选框 默认勾选和禁止勾选](https://blog.csdn.net/MM_520131400/article/details/126500387)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文