| | |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | :border="border" |
| | | :show-selection="showSelection" |
| | | :max-height="maxHeight" |
| | | :header-cell-style="{ background: '#EBEEF5', color: '#3D3D3D' }" |
| | | @selection-change="handleSelectionChange" |
| | | @row-click="handleRowClick" |
| | | @row-dblclick="handleRowDblClick" |
| | |
| | | size="small" |
| | | @click="handleEdit(scope.row)" |
| | | >编辑</el-button> |
| | | <el-button |
| | | v-if="operations.includes('delete')" |
| | | link |
| | | type="danger" |
| | | size="small" |
| | | @click="handleDelete(scope.row)" |
| | | >删除</el-button> |
| | | <!-- <el-button--> |
| | | <!-- v-if="operations.includes('delete')"--> |
| | | <!-- link--> |
| | | <!-- type="danger"--> |
| | | <!-- size="small"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- >删除</el-button>--> |
| | | </slot> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | // 操作列宽度 |
| | | operationsWidth: { |
| | | type: [String, Number], |
| | | default: 160 |
| | | default: 100 |
| | | }, |
| | | // 显示哪些操作按钮 |
| | | operations: { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | :deep(.el-table) { |
| | | margin-bottom: 20px; |
| | | overflow-x: auto; |
| | | .el-table { |
| | | margin: 20px 0 !important; |
| | | } |
| | | |
| | | :deep(.el-table th) { |