This commit is contained in:
tangjinzhou 2018-01-31 10:30:09 +08:00
parent 5cf383987c
commit 9b2669ba99
2 changed files with 12 additions and 9 deletions

View File

@ -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)

View File

@ -1,5 +1,5 @@
<script>
import RcDropdown from './src/dropdown'
import RcDropdown from './src/index'
import DropdownButton from './dropdown-button'
// import warning from '../_util/warning'
import PropTypes from '../_util/vue-types'
@ -73,5 +73,6 @@ const Dropdown = {
Dropdown.Button = DropdownButton
export default Dropdown
export { DropdownProps }
</script>