修复:标准表格不支持嵌套属性的问题;🐛

fix: the problem that StandardTable.vue not support nested attributes;
master
chenghongxing 4 years ago
parent 010ffdaacb
commit 935cd77d4f
  1. 4
      src/components/table/StandardTable.vue

@ -97,9 +97,9 @@ export default {
total: selectedRows.reduce((sum, val) => { total: selectedRows.reduce((sum, val) => {
let v let v
try{ try{
v = val[item.index] ? val[item.index] : eval(`val.${item.dataIndex}`); v = val[item.dataIndex] ? val[item.dataIndex] : eval(`val.${item.dataIndex}`);
}catch(_){ }catch(_){
v = val[item.index]; v = val[item.dataIndex];
} }
v = !isNaN(parseFloat(v)) ? parseFloat(v) : 0; v = !isNaN(parseFloat(v)) ? parseFloat(v) : 0;
return sum + v return sum + v

Loading…
Cancel
Save