Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经通读了文档,虽然它处理了由于 url(哈希)更改而更改的路由,但它没有解释如何处理书签/重新加载的路由。
我知道它是一个最小的路由器,但它肯定能够在浏览器刷新时处理加载路由吗?
您可以riot.route.exec()在您的主要标签/初始化方法中使用。它查看当前哈希并发出相应的路由:http://riotjs.com/api/route/#riot-route-exec。
riot.route.exec()