美文网首页
vue 使用elementUi总结的一些问题

vue 使用elementUi总结的一些问题

作者: 布呐呐aa | 来源:发表于2020-06-28 11:33 被阅读0次
  1. 做项目的时候需要通过判断其中的一个字段是否显示,需要取出其中的值
    就用到了 slot-scope="scope"
<el-dialog title="收货地址" :visible.sync="dialogTableVisible">
        <el-table :data="gridData">
          <el-table-column property="name" label="课程名称" width="450"></el-table-column>
          <el-table-column property="status" label="学习状态">
            <template slot-scope="scope">
              <span v-if="scope.row.status == 0">未学习</span>
              <span v-if="scope.row.status == 1">正在学习</span>
              <span v-if="scope.row.status == 2">已学习</span>
            </template>
          </el-table-column>
<!--          <el-table-column property="status" label="学习状态" v-if="gridData.status == 1">-->
<!--            正在学习-->
<!--          </el-table-column>-->
<!--          <el-table-column property="status" label="学习状态" v-if="gridData.status == 2">-->
<!--            已学习-->
<!--          </el-table-column>-->
        </el-table>
      </el-dialog>

相关文章

网友评论

      本文标题:vue 使用elementUi总结的一些问题

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