<div id="app">
  <!-- key: 键值  index: 对象的位置 -->
  <div v-for="(item,key,index) of list">
    {{item}}---{{key}} ---{{index}}
  </div>
</div>
var app = new Vue({
  el: "#app",
  data: {
    list: {
      name: "xiaodonxgier",
      age: "18",
      gender: "male",
      salary: "secret"
    }
  }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.7.8/vue.min.js