小编Joh*_*ohn的帖子

Vuejs 嵌套 v-for 和 <tr> 标签问题

当我尝试在 a 中嵌套 a 并在每个 a 上绑定 v-for 时,vue 抱怨属性未定义。有什么问题?

<table>
  <thead></thead>
  <tbody>
    <tr v-for="item in items">
      <td>{{ item.name }}</td>
      <tr v-for="child in item.children">
        <td>{{ child.name }}</td>
      </tr>
    </tr>
  </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

这是一个js小提琴: https: //jsfiddle.net/78s3qnz5/

html binding html-table vue.js v-for

1
推荐指数
1
解决办法
1840
查看次数

标签 统计

binding ×1

html ×1

html-table ×1

v-for ×1

vue.js ×1