Skip to content

Commit b82dd34

Browse files
committed
fix: table tree not have animate
1 parent 3a2a672 commit b82dd34

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

components/dropdown/dropdown.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import RightOutlined from '@ant-design/icons-vue/RightOutlined';
1010
import useConfigInject from '../_util/hooks/useConfigInject';
1111
import devWarning from '../vc-util/devWarning';
1212
import omit from '../_util/omit';
13+
import getPlacements from '../tooltip/placements';
1314

1415
export type DropdownProps = Partial<ExtractPropTypes<ReturnType<typeof dropdownProps>>>;
1516

@@ -121,10 +122,15 @@ const Dropdown = defineComponent({
121122
if (triggerActions && triggerActions.indexOf('contextmenu') !== -1) {
122123
alignPoint = true;
123124
}
125+
126+
const builtinPlacements = getPlacements({
127+
arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
128+
});
124129
const dropdownProps = omit(
125130
{
126131
...props,
127132
...attrs,
133+
builtinPlacements,
128134
overlayClassName: overlayClassNameCustomized,
129135
arrow,
130136
alignPoint,

components/dropdown/props.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ type Align = {
1717
useCssBottom?: boolean;
1818
useCssTransform?: boolean;
1919
};
20+
21+
export type DropdownArrowOptions = {
22+
pointAtCenter?: boolean;
23+
};
2024
const dropdownProps = () => ({
21-
arrow: PropTypes.looseBool,
25+
arrow: {
26+
type: [Boolean, Object] as PropType<boolean | DropdownArrowOptions>,
27+
default: undefined,
28+
},
2229
trigger: {
2330
type: [Array, String] as PropType<
2431
('click' | 'hover' | 'contextmenu')[] | 'click' | 'hover' | 'contextmenu'

0 commit comments

Comments
 (0)