Skip to content
ReferenceVersion 6.0.2

Hooks ​

Import public template hooks from @/hooks. The hooks tied to components, useForm, useModal, useChart, and useFlow, come from @/components and are documented with each component. Import useRequest from @/axios.

TaskReference
Build menus, navigate, manage tabs, or add menu badgesNavigation and menus
Maximize, reload, or scroll the content areaLayout and scrolling
Set themes, language, or watermarksThemes and localization
Implement pagination or context menusComponent interactions
Observe viewport size, fill the viewport, or work with datesViewport and dates
Capture or print DOM contentCapture and printing

Create hooks that subscribe, listen, or register cleanup during setup() or within an active Vue effect scope. Capture, print, and fullscreen actions should run after DOM mount or on user interaction. BasicTarget accepts elements, refs, or getters. Vue and DOM targets

@/hooks/web/useI18n, @/hooks/web/useVueRouter, and @/hooks/web/usePagination remain as compatibility imports. Use @/hooks in new application code. Hook implementation and test index