LetrouternewVueRouter ({hashbang: true, history: true, saveScrollPosition: true, transitionOnLoad: true}) enables the vue-router's history function, which I think is convenient to use, the list page is returned from the details page... let router = new VueRouter ({
Hashbang: true,
History: true,
SaveScrollPosition: true,
TransitionOnLoad: true
})
To enable the history function of vue-router, I think it is convenient to use its location function, that is, it can be automatically located on the return list page of the detailed page.
However, there is a refresh problem.
Do not use history, url format is http://xxx.xxx.xxx/index! Goodslist
After history is used, the url format is http://xxx.xxx.xxx/goodslist.
Excuse me, how can I use history to automatically add/index # To each url address #! .
Reply content:
Let router = new VueRouter ({
Hashbang: true,
History: true,
SaveScrollPosition: true,
TransitionOnLoad: true
})
To enable the history function of vue-router, I think it is convenient to use its location function, that is, it can be automatically located on the return list page of the detailed page.
However, there is a refresh problem.
Do not use history, url format is http://xxx.xxx.xxx/index! Goodslist
After history is used, the url format is http://xxx.xxx.xxx/goodslist.
Excuse me, how can I use history to automatically add/index # To each url address #! .
There are two frontend routing modes: hash mode and # navigation. The other is the Html5HistoryAPI mode, where # is not used #.
When you enable history, you use the Html5HistoryAPI mode. This mode is not used #
History. pushstate write it in?
Why do I need this when the history mode is enabled #! What about it?