<el-table :row-key="getRowKeys" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"> <el-table-column :reserve-selection="true" align="center" type="selection"></el-table-column> <el-table-column align="center" label="商品图片"> <template slot-scope="scope"> <div> <img style="width: 60px; height: 60px" :src="scope.row.pic_cover" alt /> </div> </template> </el-table-column> <el-table-column align="center" prop="goods_name" label="商品名称"></el-table-column> <el-table-column align="center" prop="price" label="商品价格"></el-table-column> </el-table>
getRowKeys(row) { return row.goods_id; },