@bye_past/vue-keep
Version:
缓存你的页面组件, 使得可以比手机APP更好的体验效果
29 lines (27 loc) • 895 B
TypeScript
import { NavigationFailure } from 'vue'
import { Route } from 'vue-router'
import { KeepLocation, OverloadRouter } from './vue-keep'
declare module 'vue-router/types/router' {
interface VueRouter extends OverloadRouter {
push(location: KeepLocation): Promise<Route>
push(location: KeepLocation): void
push(
location: KeepLocation,
onComplete?: Function,
onAbort?: ErrorHandler
): void
replace(location: KeepLocation): Promise<Route>
replace(location: KeepLocation): void
replace(
location: KeepLocation,
onComplete?: Function,
onAbort?: ErrorHandler
): void
}
}
declare module 'vue-router/dist/vue-router' {
interface Router extends OverloadRouter {
push(location: KeepLocation): Promise<NavigationFailure | void | undefined>
replace(location: KeepLocation): Promise<NavigationFailure | void | undefined>
}
}