Vue.js vuepress路由器链接活动样式无效

Vue.js vuepress路由器链接活动样式无效,vue.js,vuepress,Vue.js,Vuepress,我有一个basicNotation.md文件,它的路由很好 <router-link to="/basicNotation">Test</router-link> 测试 但是,当渲染此对象并将其路由到该对象时,结果如下: <a href="/basicNotation" class="">Test</a> 请注意,没有类应用于锚定标记 根据vuejs文档,渲染应如下所示: 我哪里出错了?好的,我在路径中添加了文件扩展名: <r

我有一个basicNotation.md文件,它的路由很好

<router-link to="/basicNotation">Test</router-link>
测试
但是,当渲染此对象并将其路由到该对象时,结果如下:

<a href="/basicNotation" class="">Test</a>

请注意,没有类应用于锚定标记

根据vuejs文档,渲染应如下所示:



我哪里出错了?

好的,我在路径中添加了文件扩展名:

<router-link to="/basicNotation.html">Test</router-link>
测试
据我所知,它是有效的。为此:

<a href="/basicNotation.html" class="router-link-exact-active router-link-active">Test</a>


当然,如果您使用干净的url(特别是vuepress clean url插件或服务器配置),您将根据清理后的url设置to属性。
<a href="/basicNotation.html" class="router-link-exact-active router-link-active">Test</a>