File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import RightOutlined from '@ant-design/icons-vue/RightOutlined';
10
10
import useConfigInject from '../_util/hooks/useConfigInject' ;
11
11
import devWarning from '../vc-util/devWarning' ;
12
12
import omit from '../_util/omit' ;
13
+ import getPlacements from '../tooltip/placements' ;
13
14
14
15
export type DropdownProps = Partial < ExtractPropTypes < ReturnType < typeof dropdownProps > > > ;
15
16
@@ -121,10 +122,15 @@ const Dropdown = defineComponent({
121
122
if ( triggerActions && triggerActions . indexOf ( 'contextmenu' ) !== - 1 ) {
122
123
alignPoint = true ;
123
124
}
125
+
126
+ const builtinPlacements = getPlacements ( {
127
+ arrowPointAtCenter : typeof arrow === 'object' && arrow . pointAtCenter ,
128
+ } ) ;
124
129
const dropdownProps = omit (
125
130
{
126
131
...props ,
127
132
...attrs ,
133
+ builtinPlacements,
128
134
overlayClassName : overlayClassNameCustomized ,
129
135
arrow,
130
136
alignPoint,
Original file line number Diff line number Diff line change @@ -17,8 +17,15 @@ type Align = {
17
17
useCssBottom ?: boolean ;
18
18
useCssTransform ?: boolean ;
19
19
} ;
20
+
21
+ export type DropdownArrowOptions = {
22
+ pointAtCenter ?: boolean ;
23
+ } ;
20
24
const dropdownProps = ( ) => ( {
21
- arrow : PropTypes . looseBool ,
25
+ arrow : {
26
+ type : [ Boolean , Object ] as PropType < boolean | DropdownArrowOptions > ,
27
+ default : undefined ,
28
+ } ,
22
29
trigger : {
23
30
type : [ Array , String ] as PropType <
24
31
( 'click' | 'hover' | 'contextmenu' ) [ ] | 'click' | 'hover' | 'contextmenu'
You can’t perform that action at this time.
0 commit comments