码迷,mamicode.com
首页 > 其他好文 > 详细

类似性别(0、1)判断的table列表数据渲染

时间:2020-01-26 13:10:10      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:switch   width   img   nbsp   列表   idt   isa   height   v-model   

1、
<el-table-column prop="gender" align="center" label="性别" width="100"> <template slot-scope="scope">{{ scope.row.gender === 0 ? ‘男‘ : ‘女‘ }}</template> </el-table-column>
2、
<el-table-column label="状态">
  <template slot-scope="scope">
    <div v-if="scope.row.userState == 0">
      <el-switch v-model="value0" disabled></el-switch>
    </div>
    <div v-else="scope.row.userState == 1">
      <el-switch v-model="value1" disabled></el-switch>
    </div>
  </template>
</el-table-column>

 

 技术图片

 

类似性别(0、1)判断的table列表数据渲染

标签:switch   width   img   nbsp   列表   idt   isa   height   v-model   

原文地址:https://www.cnblogs.com/sylys/p/12234026.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!