diff --git a/src/UniqueProvider/UniqueBody.tsx b/src/UniqueProvider/UniqueBody.tsx index 9175c771..e60e0bac 100644 --- a/src/UniqueProvider/UniqueBody.tsx +++ b/src/UniqueProvider/UniqueBody.tsx @@ -3,7 +3,7 @@ import useOffsetStyle from '../hooks/useOffsetStyle'; import classNames from 'classnames'; import CSSMotion from '@rc-component/motion'; import type { CSSMotionProps } from '@rc-component/motion'; -import type { AlignType } from '../interface'; +import type { AlignType, ArrowPos } from '../interface'; export interface UniqueBodyProps { prefixCls: string; // ${prefixCls}-unique-body @@ -15,6 +15,7 @@ export interface UniqueBodyProps { offsetB: number; offsetX: number; offsetY: number; + arrowPos?: ArrowPos; popupSize?: { width: number; height: number }; motion?: CSSMotionProps; uniqueBgClassName?: string; @@ -32,6 +33,7 @@ const UniqueBody = (props: UniqueBodyProps) => { offsetB, offsetX, offsetY, + arrowPos, popupSize, motion, uniqueBgClassName, @@ -84,11 +86,13 @@ const UniqueBody = (props: UniqueBodyProps) => {
); }} diff --git a/src/UniqueProvider/index.tsx b/src/UniqueProvider/index.tsx index 2d8aae34..78643a8f 100644 --- a/src/UniqueProvider/index.tsx +++ b/src/UniqueProvider/index.tsx @@ -214,6 +214,10 @@ const UniqueProvider = ({ children }: UniqueProviderProps) => { offsetB={offsetB} offsetX={offsetX} offsetY={offsetY} + arrowPos={{ + x: arrowX, + y: arrowY, + }} popupSize={popupSize} motion={options.popupMotion} uniqueBgClassName={classNames( diff --git a/tests/unique.test.tsx b/tests/unique.test.tsx index ec6f57d2..86bd09e3 100644 --- a/tests/unique.test.tsx +++ b/tests/unique.test.tsx @@ -236,6 +236,7 @@ describe('Trigger.Unique', () => { }, }, }} + arrow >