mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(components): Simplified event handling (#21432)
* refactor(components): Simplified event handling * Update packages/components/tooltip/src/tooltip.vue Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com> --------- Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
This commit is contained in:
@@ -124,12 +124,8 @@ provide(TOOLTIP_INJECTION_KEY, {
|
||||
id,
|
||||
open: readonly(open),
|
||||
trigger: toRef(props, 'trigger'),
|
||||
onOpen: (event?: Event) => {
|
||||
onOpen(event)
|
||||
},
|
||||
onClose: (event?: Event) => {
|
||||
onClose(event)
|
||||
},
|
||||
onOpen,
|
||||
onClose,
|
||||
onToggle: (event?: Event) => {
|
||||
if (unref(open)) {
|
||||
onClose(event)
|
||||
@@ -189,7 +185,7 @@ defineExpose({
|
||||
*/
|
||||
onOpen,
|
||||
/**
|
||||
* @description expose onOpen function to mange el-tooltip open state
|
||||
* @description expose onClose function to manage el-tooltip close state
|
||||
*/
|
||||
onClose,
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user