js 的 For_Of - daniel-qa/Vue GitHub Wiki

js 的 For_Of

#

  • ref 的數據
for (const column3 of column3Items.value) {
    // 在这里处理每一个 column3
}

第一層,必須是 Array

  • 一般 Array 數據
for (const item of column3Items) {
  if (item.type === 1) {
    // 处理 type 为 1 的数据
    console.log(item);
  }
}