element-ui Table 组件循环列表数据不显示?

<el-table :data="peopleList" height='270'>

  <el-table-column v-for="col in columns" :prop="col.id" :key="col.id" :align='col.align' :label="col.label" :width="col.width">
    <template slot-scope="scope" v-if="col.label == '头像'">
      <img :src='scop.row.puIcon'>
    </template>
    <template slot-scope="scope" v-if="col.label == '操作'">
      <a @click="del(scope.row)" class="table-del" size="small">删除</a>
    </template>
  </el-table-column>
</el-table>


 columns: [{
      label: '头像',
      id: 'puIcon',
      width: '80'
    },
    {
      label: '邮箱',
      id: 'peopleMail',
      align: 'center'
    },
    {
      label: '操作',
      id: 'operate',
      width: '80'
    },
    
    this.peopleList = [{
    "createBy": 0,
    "del": 0,
    "peopleAppId": 0,
    "peopleAutoLogin": 0,
    "peopleId": 28,
    "peopleMail": "4324324234234@qq.com",
    "peopleMailCheck": -1,
    "peoplePhone": "4324234234234234",
    "peoplePhoneCheck": -1,
    "puCity": 0,
    "puDistrict": 0,
    "puIcon": "/upload/1/people/desfsfsfds.png",
    "puProvince": 0,
    "puStreet": 0,
    "updateBy": 0
  }]
  
  这样进行table初始化,但是table不显示数据?

clipboard.png有没有大佬知道原因?

阅读 10.1k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题