|
|
@ -31,11 +31,11 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="addr" label="地址" min-width="180" sortable> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column inline-template :context="_self" label="操作" width="150"> |
|
|
|
<span> |
|
|
|
<el-button size="small" @click="handleEdit(row)">编辑</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleDel(row)">删除</el-button> |
|
|
|
</span> |
|
|
|
<el-table-column label="操作" width="150"> |
|
|
|
<template scope="scope"> |
|
|
|
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
@ -181,7 +181,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
//删除 |
|
|
|
handleDel: function (row) { |
|
|
|
handleDel: function (index, row) { |
|
|
|
this.$confirm('确认删除该记录吗?', '提示', { |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
@ -203,7 +203,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
//显示编辑界面 |
|
|
|
handleEdit: function (row) { |
|
|
|
handleEdit: function (index, row) { |
|
|
|
this.editFormVisible = true; |
|
|
|
this.editForm = Object.assign({}, row); |
|
|
|
}, |
|
|
|