前端哥不喜欢废话,直接上代码,一路了然
这里是html
<el-dropdown size="small" @command=" (command) => { openHandleClickMore(command, scope.$index, scope.row); } " > <el-button class="btn-mixins"> 更多菜单<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item v-for="(item, idx) in list" :key="idx" :command="idx" >{{ item.title }}</el-dropdown-item > </el-dropdown-menu> </el-dropdown>
这里是js
openHandleClickMore(rowIndex, row, index) { console.log(rowIndex, row, index); }