import { navigate as reachNavigate , NavigateOptions } from '@reach/router' ; import { routerModel } from '@/router' ; param url param options export function navigate ( url , options ? ) { if ( options && options . replace ) { routerModel . POP ( ) ; } reachNavigate ( url , options ) ; } export function go ( delta ? ) { window . history . go ( delta ) ; } /**
 * 路由回退
 */ export function goback ( ) { window . history . back ( ) ; } export default { navigate , go , back : goback , } ;