当前位置:   article > 正文

[Vue]el-table-column通过prop参数传递数据_el-table-column prop

el-table-column prop

初始化数据

  1. data(){
  2. return {
  3. temperatrue:"",
  4. timedate:"",
  5. form:{
  6. url:"",
  7. temperatrue:"",
  8. uid:"",
  9. },
  10. pageNum:1,
  11. pageSize:10,
  12. tableData:[],
  13. UploadFormVisible:false,
  14. user:localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):{},
  15. }
  16. },

在表格中传参

  1. <el-table ref="multipleTable"
  2. tooltip-effect="dark"
  3. :data="tableData"
  4. border stripe
  5. style="font-weight:500;font-size:14px;"
  6. @selection-change="handleSelectionChange"
  7. >
  8. >
  9. <el-table-column type="selection" width="55"></el-table-column>
  10. <el-table-column prop="lessonname" label="课程名" width="140"></el-table-column>
  11. <el-table-column prop="location" label="上课地点" width="100"></el-table-column>
  12. <el-table-column prop="lessontime" label="上课时间" width="220"></el-table-column>
  13. <el-table-column prop="nickname" label="学生名字" width="100"></el-table-column>
  14. <el-table-column prop="inclass" label="班级" width="200"></el-table-column>
  15. <el-table-column label="操作" align="center">
  16. <template slot-scope="scope">
  17. <el-button type="success" @click="handleDetail(scope.row)">学生详情</el-button>
  18. <el-button type="primary" @click="handleComment(scope.row)">评价学生</el-button>
  19. <el-button type="warning" @click="handleWord(scope.row)">留言学生</el-button>
  20. </template>
  21. </el-table-column>
  22. </el-table>

效果展示:

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/117960?site
推荐阅读
相关标签
  

闽ICP备14008679号