SoFunction
Updated on 2025-04-05

Detailed explanation of the method of double-layer nested for traversal, similar to php foreach

Mainly use the template tag, which can be equivalent to php foreach()

 foreach(lists as $key){
 //todo
  foreach($key.Custom fields as k){
  //todo
  }
 }
<template v-for="key in lists" v-cloak>
  <tr>
   <td></td>
   <td ></td>
   <td ></td>
   <td ></td>
  </tr>
  <tr v-for="v in key.custom fields">
   <td></td>
   <td v-text=""></td>
   <td v-text=""></td>
   <td v-text=""></td>
  </tr>
</template>

The above article provides detailed explanation of the method of double-layer nested for traversal, similar to php foreach() is all the content I share with you. I hope you can give you a reference and I hope you can support me more.