@hsu-react/ui 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,12 +59,15 @@
59
59
  white-space: nowrap;
60
60
  }
61
61
 
62
- &:global(.ant-table-column-sort) {
62
+ // 排序列:antd 会用 bodySortBg 单独给该列的单元格上底色,这里抹掉,
63
+ // 让「哪一列在排序」只由表头的高亮与箭头表达。
64
+ // 只抹静止态——从前连悬浮态一起抹掉、再补一支 --cf-subtle 回来,
65
+ // 而整行其余单元格走的是 antd 的 rowHoverBg,两支值并不相等(库自带调色板下
66
+ // 是 #fafbfc vs #f6f7f9),悬浮一行时排序列会比其余列深一块、整行裂成两截。
67
+ // 排除掉悬浮态后,该单元格自然落回 antd 的行悬浮规则,与整行始终同色,
68
+ // 且不依赖消费方是否同步设置了 --cf-subtle / rowHoverBg。
69
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
63
70
  background: transparent;
64
-
65
- &:global(.ant-table-cell-row-hover) {
66
- background: var(--cf-subtle);
67
- }
68
71
  }
69
72
  }
70
73
 
@@ -87,12 +90,9 @@
87
90
  :global(.ant-table-cell) {
88
91
  padding: var(--td-padding);
89
92
 
90
- &:global(.ant-table-column-sort) {
93
+ // 同上:只抹静止态,悬浮态落回 antd 的行悬浮色,避免汇总行也裂成两截
94
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
91
95
  background: transparent;
92
-
93
- &:global(.ant-table-cell-row-hover) {
94
- background: var(--cf-subtle);
95
- }
96
96
  }
97
97
  }
98
98
  }
@@ -59,12 +59,15 @@
59
59
  white-space: nowrap;
60
60
  }
61
61
 
62
- &:global(.ant-table-column-sort) {
62
+ // 排序列:antd 会用 bodySortBg 单独给该列的单元格上底色,这里抹掉,
63
+ // 让「哪一列在排序」只由表头的高亮与箭头表达。
64
+ // 只抹静止态——从前连悬浮态一起抹掉、再补一支 --cf-subtle 回来,
65
+ // 而整行其余单元格走的是 antd 的 rowHoverBg,两支值并不相等(库自带调色板下
66
+ // 是 #fafbfc vs #f6f7f9),悬浮一行时排序列会比其余列深一块、整行裂成两截。
67
+ // 排除掉悬浮态后,该单元格自然落回 antd 的行悬浮规则,与整行始终同色,
68
+ // 且不依赖消费方是否同步设置了 --cf-subtle / rowHoverBg。
69
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
63
70
  background: transparent;
64
-
65
- &:global(.ant-table-cell-row-hover) {
66
- background: var(--cf-subtle);
67
- }
68
71
  }
69
72
  }
70
73
 
@@ -87,12 +90,9 @@
87
90
  :global(.ant-table-cell) {
88
91
  padding: var(--td-padding);
89
92
 
90
- &:global(.ant-table-column-sort) {
93
+ // 同上:只抹静止态,悬浮态落回 antd 的行悬浮色,避免汇总行也裂成两截
94
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
91
95
  background: transparent;
92
-
93
- &:global(.ant-table-cell-row-hover) {
94
- background: var(--cf-subtle);
95
- }
96
96
  }
97
97
  }
98
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsu-react/ui",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "一套基于 React + Ant Design 的中后台业务组件库",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -59,12 +59,15 @@
59
59
  white-space: nowrap;
60
60
  }
61
61
 
62
- &:global(.ant-table-column-sort) {
62
+ // 排序列:antd 会用 bodySortBg 单独给该列的单元格上底色,这里抹掉,
63
+ // 让「哪一列在排序」只由表头的高亮与箭头表达。
64
+ // 只抹静止态——从前连悬浮态一起抹掉、再补一支 --cf-subtle 回来,
65
+ // 而整行其余单元格走的是 antd 的 rowHoverBg,两支值并不相等(库自带调色板下
66
+ // 是 #fafbfc vs #f6f7f9),悬浮一行时排序列会比其余列深一块、整行裂成两截。
67
+ // 排除掉悬浮态后,该单元格自然落回 antd 的行悬浮规则,与整行始终同色,
68
+ // 且不依赖消费方是否同步设置了 --cf-subtle / rowHoverBg。
69
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
63
70
  background: transparent;
64
-
65
- &:global(.ant-table-cell-row-hover) {
66
- background: var(--cf-subtle);
67
- }
68
71
  }
69
72
  }
70
73
 
@@ -87,12 +90,9 @@
87
90
  :global(.ant-table-cell) {
88
91
  padding: var(--td-padding);
89
92
 
90
- &:global(.ant-table-column-sort) {
93
+ // 同上:只抹静止态,悬浮态落回 antd 的行悬浮色,避免汇总行也裂成两截
94
+ &:global(.ant-table-column-sort):not(:global(.ant-table-cell-row-hover)) {
91
95
  background: transparent;
92
-
93
- &:global(.ant-table-cell-row-hover) {
94
- background: var(--cf-subtle);
95
- }
96
96
  }
97
97
  }
98
98
  }