为什么路由器链接在Firefox和IE中不起作用,但在vue js中在Safari和Chrome中正常工作?

时间:2017-10-17 09:44:09

标签: vuejs2 vue-component vue-router



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>
&#13;
&#13;
&#13;

以下是路线代码:

&#13;
&#13;
export const routes =[
    { path:'', component: ContentArea},
    { path:'/combo/', component: Comparison }
  ];
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:3)

尝试使用li而不是按钮。

&#13;
&#13;
<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>
&#13;
&#13;
&#13;