From 878941fe215c961820e8e933568ecf0edfede36d Mon Sep 17 00:00:00 2001 From: zhouyun Date: Fri, 6 Sep 2024 10:56:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(date-picker):=20=E8=A7=A3=E5=86=B3=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E9=97=AE=E9=A2=98=20(#2986)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/date-picker/src/DatePicker.tsx | 3 +-- packages/ui/date-picker/src/types.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/date-picker/src/DatePicker.tsx b/packages/ui/date-picker/src/DatePicker.tsx index a6a1d125b..c45d07249 100644 --- a/packages/ui/date-picker/src/DatePicker.tsx +++ b/packages/ui/date-picker/src/DatePicker.tsx @@ -86,8 +86,7 @@ export const DatePicker = forwardRef( }, ref ) => { - const i18n = useLocaleConte - xt() + const i18n = useLocaleContext() const locale = i18n.locale const [dateRangeTimePanelNow, setDateRangeTimePanelNow] = useState(0) diff --git a/packages/ui/date-picker/src/types.ts b/packages/ui/date-picker/src/types.ts index 2237ecb15..51bf230d3 100644 --- a/packages/ui/date-picker/src/types.ts +++ b/packages/ui/date-picker/src/types.ts @@ -291,6 +291,7 @@ export interface DatePickerProps extends Omit, 'placehold * 自定义触发器 */ customRender?: React.ReactNode | ((option: (Date | undefined)[]) => React.ReactNode) + /** * 选择框前置内容 */ prefix?: React.ReactNode