vue-router / onBeforeRouteLeave
onBeforeRouteLeave() 
ts
function onBeforeRouteLeave(leaveGuard): void;Add a navigation guard that triggers whenever the component for the current location is about to be left. Similar to beforeRouteLeave but can be used in any component. The guard is removed when the component is unmounted.
Parameters 
leaveGuard 
Returns 
void

