美文网首页
vue3 获取表格某行数据

vue3 获取表格某行数据

作者: web30 | 来源:发表于2023-06-25 14:53 被阅读0次
    1. 获取表格某行数据
    //vue2.x的写法
    <el-table-column label="测试" align="center" prop="ce">
        <template slot-scope="scope"> //2.x的写法
            <span>{{scope.row.ce}}</span>
        </template> 
    
    <el-table-column prop="msgType" label="消息内容">
       <template #default="{ row, $index }">
          <span v-if="row.msgType == 1">{{ row.msg }}</span>
        </template>
    </el-table-column>
    

    相关文章

      网友评论

          本文标题:vue3 获取表格某行数据

          本文链接:https://www.haomeiwen.com/subject/vzwhydtx.html