取自ruoyi框架
1
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" > <span class="el-dropdown-link"> <i class="el-icon-d-arrow-right el-icon--right"></i>更多 </span> <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="handleResetPwd" icon="el-icon-key" >重置密码</el-dropdown-item > <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" >分配角色</el-dropdown-item > </el-dropdown-menu> </el-dropdown>
2
handleCommand(command, row) { switch (command) { case "handleResetPwd": this.handleResetPwd(row); break; case "handleAuthRole": this.handleAuthRole(row); break; default: break; } },
标签:case,handleAuthRole,表格,elementui,break,command,更多下,row From: https://www.cnblogs.com/jqynr/p/17030534.html