
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
vue-router-backward
Advanced tools
add backward function to vue-router,the function is difference from browser history
add backward function to vue-router,the function is difference from browser history
It will record the first router to the current router.And a route can only be recorded once. For example:
browser history:
A > B > C > B > D
the 'backward' module will record:
1: A
2: A > B
3: A > B > C
4: A > B
5: A > B > D
Finally, when you use 'backward' back from page B, you will arrive at page A.
npm install vue-router-backward
or
yarn install vue-router-backward
First, add backward function to router.
import Vue from 'vue'
import Router from 'vue-router'
import backward from 'vue-router-backward'
Vue.use(Router)
let router = new Router({
routes: [
...
]
})
export default backward(router)
Second, trigger the backward function
export default {
name: 'xxx',
methods: {
goBefore () {
this.$router.backward()
}
}
}
You can judge whether it's back or not in the previous page
if (this.$route.params.isBack) {
this.transitionEffect = ''
if(this.$route.params.backFrom === 'AMap'){ // When you use 'backward', it brings in the name of the route
this.AMapComplete = true
}
}else {
this.transitionEffect = 'slideInRight'
}
FAQs
add backward function to vue-router,the function is difference from browser history
The npm package vue-router-backward receives a total of 0 weekly downloads. As such, vue-router-backward popularity was classified as not popular.
We found that vue-router-backward demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.