fix: datepicker arrow error

This commit is contained in:
tangjinzhou 2022-06-07 09:52:47 +08:00
parent e907ffd759
commit 71c6195771

View File

@ -986,7 +986,6 @@ function RangerPicker<DateType>() {
) {
// Arrow offset
arrowLeft = startInputDivRef.value.offsetWidth + separatorRef.value.offsetWidth;
if (
panelDivRef.value.offsetWidth &&
arrowRef.value.offsetWidth &&
@ -1001,7 +1000,8 @@ function RangerPicker<DateType>() {
}
}
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<DateType>() {
return (
<div
class={`${prefixCls}-panel-container`}
style={{ marginLeft: panelLeft }}
style={{ marginLeft: `${panelLeft}px` }}
ref={panelDivRef}
onMousedown={e => {
e.preventDefault();