element-ui, el-table, el-button pass parameters id, index

Problem description: When using element-ui, I want to pass parameters in the el-button of the el-table when looping.

Problem solving:
1: As stated on the official website, if you want to get the id or the parameters you want to pass, write it like: scope.row.id,
if you just want to pass the subscript: scope.$index
Insert picture description here
2: The result of my own writing is as follows:
Insert picture description here
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_38192709/article/details/112299817