Vue路由器,删除某些页面上的哈希 [英] Vue router, remove hash on some pages
本文介绍了Vue路由器,删除某些页面上的哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 vue和vue路由器.
默认情况下,它将在网址中添加#/
.我想将某些页面用作PHP,并将其他页面由vue路由器呈现.
By default it will add #/
to the urls. I want to have some pages served as PHP and other pages rendered by vue router.
示例
我希望所有这些都能起作用:
I want all these to work:
-
example.com
-
example.com/#/some/query/
-
example.com/about
-
example.com/about#/some/query/
有可能吗?
推荐答案
最后,是的-可能的.但是混合使用不同的模式通常不是一个好主意-它将导致体系结构混乱.选择历史记录或哈希模式,仅使用其中之一即可使您的应用程序保持一致.
In the end, yes - it is possible. But mixing different modes is generally bad idea - it will leads to mess in architecture. Choose history or hash mode and make your application consistent, using just one of them.
这篇关于Vue路由器,删除某些页面上的哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文