From 8c45c73222b4edafb1c5f8cac47cf8195d9ac77f Mon Sep 17 00:00:00 2001 From: George H Date: Fri, 27 Oct 2023 10:17:17 +0800 Subject: [PATCH] style(data-picker): add time-picker scrollbar styles (#45478) * style(data-picker): add time-picker scrollbar styles Signed-off-by: George H * style(data-picker): add time-picker scrollbar styles Signed-off-by: George H * style(time-picker) :Compatible with firefox --------- Signed-off-by: George H --- components/date-picker/style/index.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/components/date-picker/style/index.ts b/components/date-picker/style/index.ts index 9fca7e8e5b..82aabb4795 100644 --- a/components/date-picker/style/index.ts +++ b/components/date-picker/style/index.ts @@ -920,6 +920,31 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => { transition: `background ${motionDurationMid}`, overflowX: 'hidden', + '&::-webkit-scrollbar': { + width: '7px', + backgroundColor: ' #f1f1f1', + }, + + '&::-webkit-scrollbar-thumb': { + backgroundColor: '#b6b2b2', + borderRadius: '5px', + }, + + '&::-webkit-scrollbar-thumb:hover': { + backgroundColor: '#7a7a7a', + }, + // 兼容firefox + '&': { + scrollbarWidth: 'thin', + scrollbarColor: `#b6b2b2 #f1f1f1`, + }, + '&::-moz-scrollbar-thumb': { + backgroundColor: '#b6b2b2', + }, + '&::-moz-scrollbar-track': { + backgroundColor: ' #f1f1f1', + }, + '&::after': { display: 'block', height: timeColumnHeight - timeCellHeight,