为什么路由器链接在Firefox和IE中不起作用,但在vue js的Safari和Chrome中正常工作?
问题描述:
为什么路由器链接在Firefox和IE中不起作用,但在vue js的Safari和Chrome中正常工作?
Here is my html code :
<button type="button" class="btn btn-default btn-block" v-for="x in filterName" v-on:click="passuserid(x.rsid)"> <router-link v-bind:to="'/combo/'"><b>{{x.last_name}}</b> {{x.first_name}}
</router-link></button>
这里是路线代码:
export const routes =[
{ path:'', component: ContentArea},
{ path:'/combo/', component: Comparison }
];
答
尝试使用,而不是按钮里。
<li class="btn btn-default btn-block" v-for="x in filterName" v-on:click="passuserid(x.rsid)">
<router-link to="/combo">{{x.last_name}}</b> {{x.first_name}}</router-link>
</li>
它只支持ES5兼容的浏览器(IE8及以下不支持)。你使用的是什么版本的Firefox? –
firefox 56.0(64位) – Sharat