首页 > 其他分享 ><template slot-scope="scope">

<template slot-scope="scope">

时间:2023-04-29 22:23:33浏览次数:32  
标签: status 该行 处置 scope 就是 row

通过后端返回的具体值,前端可以映射想要的值

如:status状态值为0就是代办,为1就是处置,为2就是完成

    <el-table-column label="工单状态" prop="status">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{
              scope.row.status == "0"
                ? "待办"
                : scope.row.status == "1"
                ? "处置中"
                : "完成"
            }}</span>
          </template>
    </el-table-column>

 

 

此外这里每行还有编辑,删除等功能,事件处理函数中的参数,scope.$index就是该行的下标,scope.row就是该行的数据所有消息对象

 

标签:,status,该行,处置,scope,就是,row
From: https://www.cnblogs.com/ixtao/p/17364563.html

相关文章