chore: add dropdown emits (#3237)

This commit is contained in:
zkwolf 2020-11-23 13:46:30 +08:00 committed by GitHub
parent 32d327cb4f
commit 04f72ed2cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ export default defineComponent({
name: 'ADropdownButton',
inheritAttrs: false,
props: DropdownButtonProps,
emits: ['click', 'visibleChange', 'update:visible'],
setup() {
return {
configProvider: inject('configProvider', defaultConfigProvider),

View File

@ -26,7 +26,9 @@ const Dropdown = defineComponent({
mouseLeaveDelay: PropTypes.number.def(0.1),
placement: DropdownProps.placement.def('bottomLeft'),
onVisibleChange: PropTypes.func,
'onUpdate:visible': PropTypes.func,
},
emits: ['visibleChange', 'update:visible'],
setup() {
return {
configProvider: inject('configProvider', defaultConfigProvider),