Vue -- 通过 template 控制表格某一列根据状态不同显示的文字不同

<el-table-column label="状态">
        <template slot-scope="scope">
          <span v-if="scope.row.status == 'init' ">已预约</span>
          <span v-if="scope.row.status == 'arrival' ">已到预约地</span>
          <span v-if="scope.row.status == 'wait' ">等待结果</span>
          <span v-if="scope.row.status == 'finish' ">已完成</span>
        </template>
</el-table-column>

版权声明:本文为weixin_44932450原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。