代码之家  ›  专栏  ›  技术社区  ›  Chin Leung

如何在for循环中使用slot scope作为索引?

  •  0
  • Chin Leung  · 技术社区  · 5 年前

    我在用 vue-datatable 其中包括:

    <slot v-for="(row, i) in processed_rows" :row="row" :columns="normalized_columns">
    

    <template slot-scope="{ row, i }">
    

    然而, i 始终返回为 undefined

    0 回复  |  直到 5 年前