Commit 5a19eb65 by wangql

解决表格刷新保留复选框选中状态的问题

1 parent 1964f674
...@@ -228,8 +228,8 @@ ...@@ -228,8 +228,8 @@
<span class="warningFont" v-if="showChoosePrError">未选择商品</span> <span class="warningFont" v-if="showChoosePrError">未选择商品</span>
</el-form-item> </el-form-item>
<div class="table_box"> <div class="table_box">
<el-table v-loading="tableLoading" :data="goodList" @selection-change="selectChange" stripe style="width: 100%" :height="TB_height" border> <el-table v-loading="tableLoading" :data="goodList" @selection-change="selectChange" :row-key="getRowKey" stripe style="width: 100%" :height="TB_height" border>
<el-table-column type="selection" width="50" fixed="left" align="center" /> <el-table-column type="selection" :reserve-selection="true" width="50" fixed="left" align="center" />
<el-table-column align="center" label="商品缩略图"> <el-table-column align="center" label="商品缩略图">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="pro-img" :src="scope.row.goodsInfo.thumbUrl"/> <img class="pro-img" :src="scope.row.goodsInfo.thumbUrl"/>
...@@ -514,6 +514,10 @@ export default { ...@@ -514,6 +514,10 @@ export default {
this.selectList = selection this.selectList = selection
}, },
getRowKey(row){
return row.id
},
/** /**
* 保存信息 * 保存信息
*/ */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!