From 04f72ed2cfad6c90b35eaad9cfb342f65e5effc7 Mon Sep 17 00:00:00 2001 From: zkwolf Date: Mon, 23 Nov 2020 13:46:30 +0800 Subject: [PATCH] chore: add dropdown emits (#3237) --- components/dropdown/dropdown-button.tsx | 1 + components/dropdown/dropdown.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/dropdown/dropdown-button.tsx b/components/dropdown/dropdown-button.tsx index 23960a4d7..c2c0455e3 100644 --- a/components/dropdown/dropdown-button.tsx +++ b/components/dropdown/dropdown-button.tsx @@ -35,6 +35,7 @@ export default defineComponent({ name: 'ADropdownButton', inheritAttrs: false, props: DropdownButtonProps, + emits: ['click', 'visibleChange', 'update:visible'], setup() { return { configProvider: inject('configProvider', defaultConfigProvider), diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 78c151230..5424150b9 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -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),