From 93db4ce19b3468b6cbe7edbc6d571b71b81a8d7b Mon Sep 17 00:00:00 2001 From: Ali Date: Mon, 8 Apr 2024 11:21:25 +0800 Subject: [PATCH] fix: fix table stripe style error --- .vscode/settings.json | 4 ++-- style/web/components/table/_index.less | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 234e4045e4..b961a46071 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,8 +3,8 @@ "less.validate": false, "scss.validate": false, "editor.codeActionsOnSave": { - "source.fixAll.stylelint": true, - "source.fixAll.eslint": true + "source.fixAll.stylelint": "explicit", + "source.fixAll.eslint": "explicit" }, "cSpell.words": [ "stylelint" diff --git a/style/web/components/table/_index.less b/style/web/components/table/_index.less index d97e52cc33..d288539f1f 100644 --- a/style/web/components/table/_index.less +++ b/style/web/components/table/_index.less @@ -291,13 +291,13 @@ } &.@{prefix}-table--header-fixed { - > .@{prefix}-table__content > table > tbody tr:nth-of-type(even) { + > .@{prefix}-table__content > table > tbody tr.@{prefix}-table__row__even { background-color: @table-highlight-bg-color; } } &:not(.@{prefix}-table--header-fixed) { - > .@{prefix}-table__content > table > tbody > tr:nth-of-type(odd):not(.@{prefix}-table__expanded-row) { + > .@{prefix}-table__content > table > tbody > tr.@{prefix}-table__row__odd:not(.@{prefix}-table__expanded-row) { background-color: @table-highlight-bg-color; } } @@ -305,13 +305,13 @@ &.@{prefix}-table--hoverable { &.@{prefix}-table__header--fixed { - tbody tr:nth-of-type(even):hover { + tbody tr.@{prefix}-table__row__even:hover { background-color: @table-highlight-bg-color--hover; } } &:not(.@{prefix}-table__header--fixed) { - > .@{prefix}-table__content > table > tbody tr:nth-of-type(odd):hover { + > .@{prefix}-table__content > table > tbody tr.@{prefix}-table__row__odd:hover { background-color: @table-highlight-bg-color--hover; } }