Comments (9)
It's probably enough to introduce another check using _current and _history.length properties. I can create a PR later.
from vue-router-back-button.
The problem is that the package listens on route enter and doesn't know if it went back by a button in the menu, the back button you added or the native back button.
from vue-router-back-button.
@MaximVanhove Yes... then that's no use in certain scenarios like I have... :/
from vue-router-back-button.
Could you explain your scenarios? Maybe I can help.
from vue-router-back-button.
I need to differentiate these two scenarios:
Page A -> navigate to Page B -> navigate to Page A
Page A -> navigate to Page B -> back button (returning to Page A)
from vue-router-back-button.
Page A -> navigate to Page B -> navigate to Page A
the third step should be stored as a separate item in history array, then it would work as expected with all the methods I think
from vue-router-back-button.
I think you can use the click event on the button and emit an event. What would you like to do if you click the back button?
from vue-router-back-button.
Well, that's tricky. I need to watch $route changes and then show or hide some component, depending on if user went back from certain route or came there from another place. Your package would solve this easily without handling events which would add complexity
from vue-router-back-button.
I guess you could fork my repo and modify it so that it only writes history. Then use the click event on the button to go back to the last.
from vue-router-back-button.
Related Issues (14)
- Error when building with Uglify/webpack HOT 2
- support for vue router v3.1.3 ? HOT 1
- Erratic Behaviour on Nuxt 2.14.0 (Vue router 3.3.4) HOT 2
- History tracking does not work when history has modified by external effects. HOT 2
- Vue3 support HOT 4
- history.length having a maximum value of 50 causing issues HOT 4
- Cant use this module HOT 1
- Not tracking history HOT 2
- No typescript support HOT 3
- Add these instructions for Nuxt support for vue-router-back-button HOT 8
- Error: $routerHistory is not defined on the instance but referenced during render HOT 1
- Issue with multiple route paths HOT 3
- render function or template not defined in component: NuxtLink HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-router-back-button.