From 06efe072eb80e35089df3f9e566a04ff4bf34b90 Mon Sep 17 00:00:00 2001 From: dengfuping Date: Tue, 14 Jan 2025 18:12:28 +0800 Subject: [PATCH] improve(ui): Remove DateRanger picker box-shadow when focus --- packages/ui/src/DateRanger/demo/simple-mode.tsx | 6 ++++++ packages/ui/src/DateRanger/index.less | 4 ++++ packages/ui/src/DateRanger/index.md | 8 +++----- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 packages/ui/src/DateRanger/demo/simple-mode.tsx diff --git a/packages/ui/src/DateRanger/demo/simple-mode.tsx b/packages/ui/src/DateRanger/demo/simple-mode.tsx new file mode 100644 index 000000000..40ca1102e --- /dev/null +++ b/packages/ui/src/DateRanger/demo/simple-mode.tsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { DateRanger } from '@oceanbase/ui'; + +export default () => { + return ; +}; diff --git a/packages/ui/src/DateRanger/index.less b/packages/ui/src/DateRanger/index.less index 584c19e08..9537da01c 100644 --- a/packages/ui/src/DateRanger/index.less +++ b/packages/ui/src/DateRanger/index.less @@ -16,6 +16,10 @@ padding-left: 0px; padding-right: 16px; border: 0px; + &:focus, + &:focus-within { + box-shadow: none; + } input { text-align: center; } diff --git a/packages/ui/src/DateRanger/index.md b/packages/ui/src/DateRanger/index.md index 8cd6c0234..c02c33473 100644 --- a/packages/ui/src/DateRanger/index.md +++ b/packages/ui/src/DateRanger/index.md @@ -7,16 +7,13 @@ nav: ## 代码演示 + - + - - - - ## API @@ -36,6 +33,7 @@ nav: | pastOnly | 只能选择过去时间 | boolean | false | - | | disabledDate | 不可选择的日期 | (currentDate: Dayjs \| Moment) => boolean | - | - | | simpleMode | 是否启用极简模式 | boolean | false | - | +| allowClear | 允许清空,仅普通模式支持,极简模式下不生效 | boolean | false | - | | hideYear | 当时间范围在本年时,隐藏年份 | boolean | false | - | | hideSecond | 隐藏"秒” | boolean | false | - | | autoCalcRange | 自动计算时间范围并回显到选择器tag | boolean | false | - |