I am in the same boat. I needed onBeforeRouteLeave for a “Unsaved changes” popup. I found a fix here.
I think the vue-router version that provides these composition api functions requires Vue3. I also think support for Quasar and Vue3 is currently in development. I might be wrong I don’t know for sure, but figured I would post the fix that worked for me while looking into this issue.