<el-table v-cloak
:default-sort="{prop: 'date', order: 'descending'}">
<el-table-column prop="name" fixed label="仓库名称" sortable>
</el-table-column>
<el-table-column prop="telePhone" label="电话号码">
</el-table-column>
<el-table-column prop="state" label="仓库状态" sortable>
<template slot-scope="scope">
<span>{{scope.row.state==1?'正常':"关闭"}}</span>
<!-- <span v-if='scope.row.state==0'>关闭</span> -->
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" sortable>
<template slot-scope="scope">
<span>{{scope.row.createTime |capitalize}}</span>
<!-- <span v-if='scope.row.state==0'>关闭</span> -->
</template>
</el-table-column>
<el-table-column prop="updateTime" label="修改时间" sortable>
<template slot-scope="scope">
<span>{{scope.row.createTime|capitalize}}</span>
<!-- <span v-if='scope.row.state==0'>关闭</span> -->
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" fixed width='300px'>
<template slot-scope="scope">
<el-button type="primary" v-if='scope.row.state==1' @click='editModleShow(scope.row)' icon="el-icon-edit" size="small">编辑</el-button>
<el-button type="primary" v-if='scope.row.state==1' @click='deleteModleShow(scope.row)' icon="el-icon-delete" size="small">删除</el-button>
<el-button type="info" v-if='scope.row.state==1' @click='forbidModleShow(scope.row)' icon="el-icon-info" size="small">禁用</el-button>
<el-button type="primary" v-if='scope.row.state==0' plain @click='forbidModleShow(scope.row)' icon="el-icon-success" size="small">启用</el-button>
</template>
</el-table-column>
</el-table>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-11-29
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案