From 71c6195771c0b9ddffadd294ce01f7515c5adc40 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 7 Jun 2022 09:52:47 +0800 Subject: [PATCH] fix: datepicker arrow error --- components/vc-picker/RangePicker.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/vc-picker/RangePicker.tsx b/components/vc-picker/RangePicker.tsx index cba4984b4c..e56c97aae3 100644 --- a/components/vc-picker/RangePicker.tsx +++ b/components/vc-picker/RangePicker.tsx @@ -986,7 +986,6 @@ function RangerPicker() { ) { // Arrow offset arrowLeft = startInputDivRef.value.offsetWidth + separatorRef.value.offsetWidth; - if ( panelDivRef.value.offsetWidth && arrowRef.value.offsetWidth && @@ -1001,7 +1000,8 @@ function RangerPicker() { } } - const arrowPositionStyle = direction === 'rtl' ? { right: arrowLeft } : { left: arrowLeft }; + const arrowPositionStyle = + direction === 'rtl' ? { right: `${arrowLeft}px` } : { left: `${arrowLeft}px` }; function renderPanels() { let panels: VueNode; @@ -1092,7 +1092,7 @@ function RangerPicker() { return (
{ e.preventDefault();