1 <el-menu-item 
 2 v-for="item in links" 
 3 :key="item.id"
 4  v-bind:index="item.id.toString()">
 6    <template slot="title">
 7       <i class="el-icon-location"></i>
 8       <span>{{item.text}}</span>
 9    </template>
10 </el-menu-item>

绑定index时加上   .toString()   就不会报错了,因为这里的index是以string的数据格式存在的。

相关文章:

  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-06-28
  • 2021-10-06
  • 2022-02-09
  • 2022-01-13
  • 2021-04-23
猜你喜欢
  • 2021-08-01
  • 2021-08-22
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案