简体   繁体   English

react-snap 附加路由(vue-router)

[英]react-snap appends routes (vue-router)

I am using router-links on my pages.我在我的页面上使用路由器链接。 After implementing react-snap, those stopped working correctly, routes are appended.实施 react-snap 后,那些停止正常工作,附加路由。 I looked into the generated HTML and everything is fine there.我查看了生成的 HTML,那里一切正常。

Take a look at the green buttons on https://static.lernzettel.org/metrum/ - when accessing the page via this link, the links are not working correctly - however, when navigating there from the homepage everything is fine.查看https://static.lernzettel.org/metrum/上的绿色按钮 - 通过此链接访问页面时,链接无法正常工作 - 但是,从主页导航时一切正常。

https://lernzettel.org/metrum is the version without using react-snap - no issues there in either case. https://lernzettel.org/metrum是不使用 react-snap 的版本 - 在任何一种情况下都没有问题。 I hope this is good enough for a demo.我希望这对于演示来说已经足够了。 The relevant code is:相关代码是:

<v-card :to="{ path: post.meta.previous_post.slug}"></v-card>

post.meta.previous_post.slug in this case is "/kadenz" | post.meta.previous_post.slug 在这种情况下是 "/kadenz" | I am using vuetify, should be rendered as a normal router-link |我用的是vuetify,应该渲染成普通的router-link | The router is in history mode.路由器处于历史模式。

Do you have any idea on how to deal with this?你知道如何处理这个问题吗?

Thanks for any help in advance ;)提前感谢您的任何帮助;)

post.meta.previous_post.slug 缺少 / - argggh,现在一切正常:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM