diff --git a/components/dropdown/dropdown-button.vue b/components/dropdown/dropdown-button.vue index f36871bd6..6873cc664 100644 --- a/components/dropdown/dropdown-button.vue +++ b/components/dropdown/dropdown-button.vue @@ -8,15 +8,17 @@ import { hasProp, getComponentFromProp } from '../_util/props-util' import getDropdownProps from './getDropdownProps' const DropdownProps = getDropdownProps() const ButtonGroup = Button.Group +const DropdownButtonProps = { + ...ButtonGroupProps, + ...DropdownProps, + type: PropTypes.oneOf(['primary', 'ghost', 'dashed', 'default']).def('default'), + disabled: PropTypes.bool, + prefixCls: PropTypes.string.def('ant-dropdown-button'), + placement: DropdownProps.placement.def('bottomRight'), +} +export { DropdownButtonProps } export default { - props: { - ...ButtonGroupProps, - ...DropdownProps, - type: PropTypes.oneOf(['primary', 'ghost', 'dashed', 'default']).def('default'), - disabled: PropTypes.bool, - prefixCls: PropTypes.string.def('ant-dropdown-button'), - placement: DropdownProps.placement.def('bottomRight'), - }, + props: DropdownButtonProps, methods: { onClick (e) { this.$emit('click', e) diff --git a/components/dropdown/dropdown.vue b/components/dropdown/dropdown.vue index fa2c9ee19..ad199a353 100644 --- a/components/dropdown/dropdown.vue +++ b/components/dropdown/dropdown.vue @@ -1,5 +1,5 @@