From 935cd77d4f1a21ead891230150517bd3efd97de1 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Sun, 6 Dec 2020 10:33:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=A0=87=E5=87=86?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E4=B8=8D=E6=94=AF=E6=8C=81=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B:bug:=20f?= =?UTF-8?q?ix:=20the=20problem=20that=20StandardTable.vue=20not=20support?= =?UTF-8?q?=20nested=20attributes;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/StandardTable.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table/StandardTable.vue b/src/components/table/StandardTable.vue index e8f6d48..44c4574 100644 --- a/src/components/table/StandardTable.vue +++ b/src/components/table/StandardTable.vue @@ -97,9 +97,9 @@ export default { total: selectedRows.reduce((sum, val) => { let v try{ - v = val[item.index] ? val[item.index] : eval(`val.${item.dataIndex}`); + v = val[item.dataIndex] ? val[item.dataIndex] : eval(`val.${item.dataIndex}`); }catch(_){ - v = val[item.index]; + v = val[item.dataIndex]; } v = !isNaN(parseFloat(v)) ? parseFloat(v) : 0; return sum + v