vue通过表格当中的数据渲染表格

<el-table-column label="审核状态" width="120">
            <template slot-scope="scope">
              <div v-if="scope.row.examStatus == 'false'">未审核</div>
              <div v-else>已审核</div>
            </template>
          </el-table-column>
          <el-table-column label="订购状态" width="120">
            <template slot-scope="scope">
              <div v-if="scope.row.purStatus == 'false'">未订购</div>
              <div v-else>已订购</div>
            </template>
          </el-table-column>

<div>是必须标签,单个<v-if>+文本会将两个选择都显示出来

posted @ 2023-11-18 21:21  锴‘  阅读(33)  评论(0编辑  收藏  举报