如图:在列表中显示物品状态是否归还,若已归还可以点击查看归还详情

<el-table-column prop="sfgh" label="是否归还" align="center">
                <template scope="scope">
                    <p v-if="scope.row.sfgh=='0'">
                        <el-button  href="javascript:void(0)" @click="getWzghInfo(scope.$index, scope.row)">已归还</el-button>
                    </p>
                    <p v-if="scope.row.sfgh=='1'">未归还</p>
                    <p v-if="scope.row.sfgh=='2'">未还清</p>
                </template>
            </el-table-column>

 <template scope="scope">:可以通过scope.row.键名,获取所在行的某一列的数据

效果如图:

vue+element在el-table-column中写v-if

相关文章:

  • 2022-12-23
  • 2021-10-16
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-05-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案