UNPKG

press-plus

Version:
21 lines (15 loc) 586 B
import { uniHookRouter } from 't-comm/es/router/uni-hook-router'; import { navigateData, type NavType } from './index'; function setNavType(navType: NavType, args: any) { console.info('setNavType', navType, args); if (!args?.disableSetNavType) { navigateData.setNavType(navType); } } export function hookRouterInPageAnimation() { uniHookRouter({ navigateToHooks: [(options: any) => setNavType('push', options)], navigateBackHooks: [(options: any) => setNavType('back', options)], redirectToHooks: [(options: any) => setNavType('replace', options)], }); }