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 = {}