Browse Source

fix: table tree not have animate

feat-css-var
tangjinzhou 3 years ago
parent
commit
b82dd34c72
  1. 6
      components/dropdown/dropdown.tsx
  2. 9
      components/dropdown/props.ts

6
components/dropdown/dropdown.tsx

@ -10,6 +10,7 @@ import RightOutlined from '@ant-design/icons-vue/RightOutlined';
import useConfigInject from '../_util/hooks/useConfigInject';
import devWarning from '../vc-util/devWarning';
import omit from '../_util/omit';
import getPlacements from '../tooltip/placements';
export type DropdownProps = Partial<ExtractPropTypes<ReturnType<typeof dropdownProps>>>;
@ -121,10 +122,15 @@ const Dropdown = defineComponent({
if (triggerActions && triggerActions.indexOf('contextmenu') !== -1) {
alignPoint = true;
}
const builtinPlacements = getPlacements({
arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
});
const dropdownProps = omit(
{
...props,
...attrs,
builtinPlacements,
overlayClassName: overlayClassNameCustomized,
arrow,
alignPoint,

9
components/dropdown/props.ts

@ -17,8 +17,15 @@ type Align = {
useCssBottom?: boolean;
useCssTransform?: boolean;
};
export type DropdownArrowOptions = {
pointAtCenter?: boolean;
};
const dropdownProps = () => ({
arrow: PropTypes.looseBool,
arrow: {
type: [Boolean, Object] as PropType<boolean | DropdownArrowOptions>,
default: undefined,
},
trigger: {
type: [Array, String] as PropType<
('click' | 'hover' | 'contextmenu')[] | 'click' | 'hover' | 'contextmenu'

Loading…
Cancel
Save