elementUI中使用radio和switch


<el-table-column prop="is_show" label="是否显示">
  <template slot-scope="scope">
    <el-switch
      disabled
      v-model="scope.row.is_show"
      active-value="1"
      inactive-value="0"
      active-color="#13ce66"
      inactive-color="#ff4949">
    </el-switch>
  </template>
</el-table-column>
<template>
  <el-radio v-model="postModel.is_show" label="1"
    >显示</el-radio
  >
  <el-radio v-model="postModel.is_show" label="0"
    >隐藏</el-radio
  >
</template>
posted @ 2021-04-28 18:58  TBHacker  阅读(233)  评论(0编辑  收藏  举报