Skip to content

Commit 27cb98a

Browse files
committed
chore: adjust style
1 parent 9a2e5e5 commit 27cb98a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

assets/index.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,13 @@
363363
position: absolute;
364364
top: 0;
365365
bottom: 0;
366-
width: 6px;
366+
width: 3px;
367367
z-index: 10;
368-
background: rgba(0, 0, 0, 0.02);
369-
transition: background 0.3s;
368+
background: rgba(0, 0, 0, 0);
369+
transition: background 0.1s;
370370

371371
&-ping {
372-
background: rgba(0, 0, 0, 0.2);
372+
background: rgba(0, 0, 0, 0.3);
373373
}
374374
}
375375
}

src/FixedColumnShadows.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,19 @@ const FixedColumnShadows = React.memo((props: FixedColumnShadowsProps) => {
6767

6868
// ===================== Render =====================
6969
const [scrollLeft, scrollRange] = scrollInfo;
70+
const absScrollLeft = Math.abs(scrollLeft);
7071

7172
// console.log('??????', scrollLeft, fixStartShadowList[1]);
72-
console.log('Scroll info:', scrollLeft, scrollRange);
73+
// console.log('Scroll info:', scrollLeft, absScrollLeft, scrollRange);
7374

7475
const renderShadow = (position: 'Start' | 'End', shadowList: FixedShadowInfo[]) => {
7576
return shadowList.map(([index, offset, showShadowScrollDeadline]) => {
7677
const calcOffset = offset + columnWidths[index];
7778

7879
const showShadow =
7980
position === 'Start'
80-
? scrollLeft > showShadowScrollDeadline
81-
: scrollRange - scrollLeft > showShadowScrollDeadline;
81+
? absScrollLeft > showShadowScrollDeadline
82+
: scrollRange - absScrollLeft > showShadowScrollDeadline;
8283

8384
return calcOffset ? (
8485
<div

0 commit comments

Comments
 (0)