From 053f4f453641660dc5125836251e42e71727d028 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Fri, 30 Jun 2023 10:10:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E7=9A=84=E5=A5=87=E6=95=B0=E5=81=B6=E6=95=B0=E8=A1=8C=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/BasicComponents/Tables/index.vue | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/Tables/index.vue b/data-room-ui/packages/BasicComponents/Tables/index.vue index bd722ea0..db823ef6 100644 --- a/data-room-ui/packages/BasicComponents/Tables/index.vue +++ b/data-room-ui/packages/BasicComponents/Tables/index.vue @@ -14,7 +14,7 @@ :data="config.option.tableData" :header-cell-style="headerCellStyle" :cell-style="cellStyle" - :row-class-name="tableRowClassName" + :row-style="rowStyle" @row-click="rowClick" > { - document.querySelectorAll(`.even-row${config.code}`).forEach(node => { - node.style.backgroundColor = config.customize.evenRowBackgroundColor - }) - document.querySelectorAll(`.odd-row${config.code}`).forEach(node => { - node.style.backgroundColor = config.customize.oddRowBackgroundColor - }) - }) this.updateKey = new Date().getTime() return config }, - // 表格行样式 - tableRowClassName ({ row, rowIndex }) { - return rowIndex % 2 === 0 ? `even-row${this.config.code}` : `odd-row${this.config.code}` - }, dataFormatting (config, data) { config.option.tableData = data?.data const filteredData = {}