Skip to content

Commit

Permalink
chore(compat): update hook event names for vue3 (now vnode events)
Browse files Browse the repository at this point in the history
  • Loading branch information
xanf committed Jan 28, 2022
1 parent 563bd48 commit 3c76198
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/constants/events.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { isVue3 } from '../vue'

export const EVENT_NAME_ACTIVATE_TAB = 'activate-tab'
export const EVENT_NAME_BLUR = 'blur'
export const EVENT_NAME_CANCEL = 'cancel'
Expand Down Expand Up @@ -54,8 +56,8 @@ export const EVENT_NAME_TOGGLE = 'toggle'
export const EVENT_NAME_UNPAUSED = 'unpaused'
export const EVENT_NAME_UPDATE = 'update'

export const HOOK_EVENT_NAME_BEFORE_DESTROY = 'hook:beforeDestroy'
export const HOOK_EVENT_NAME_DESTROYED = 'hook:destroyed'
export const HOOK_EVENT_NAME_BEFORE_DESTROY = isVue3 ? 'vnodeBeforeUnmount' : 'hook:beforeDestroy'
export const HOOK_EVENT_NAME_DESTROYED = isVue3 ? 'vNodeUnmounted' : 'hook:destroyed'

export const MODEL_EVENT_NAME_PREFIX = 'update:'

Expand Down

0 comments on commit 3c76198

Please sign in to comment.