From f044e9d01bb017ed9c8ba724bb2a99bcc0909dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Fri, 4 Sep 2020 08:24:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(commonTable):=20=E6=9C=AA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?action=E5=88=97=E5=AF=BC=E8=87=B4=E7=9A=84=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/components/common-table/common-table.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/view/admin/components/common-table/common-table.component.ts b/src/app/view/admin/components/common-table/common-table.component.ts index 8f9dd9c..1575841 100644 --- a/src/app/view/admin/components/common-table/common-table.component.ts +++ b/src/app/view/admin/components/common-table/common-table.component.ts @@ -146,6 +146,9 @@ export class CommonTableComponent implements OnInit, OnChanges { dist = JSON.parse(JSON.stringify(source)); } const action = this.headData.filter(value => value.isActionColumns).pop(); + if (!action) { + return dist; + } const del = dist.filter(value => value.isActionColumns).pop() dist.splice(dist.indexOf(del), 1); dist.push(action);