element表格中使⽤if语句,scope写法
<el-table v-cloak id="mybox" :row-class-name="tableRowClassName" height="100%" :data="pageDate" :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>{{w.state==1?'正常':"关闭"}}</span>
<!-- <span v-if='w.state==0'>关闭</span> -->
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" sortable>
<template slot-scope="scope">
<span>{{ateTime |capitalize}}</span>
<!-- <span v-if='w.state==0'>关闭</span> -->
</template>
</el-table-column>
<el-table-column prop="updateTime" label="修改时间" sortable>
<template slot-scope="scope">
<span>{{ateTime|capitalize}}</span>
<!-- <span v-if='w.state==0'>关闭</span> -->
</template>
tabletime</el-table-column>
<el-table-column fixed="right" label="操作" fixed width='300px'>
<template slot-scope="scope">
<el-button type="primary" v-if='w.state==1' @click='w)' icon="el-icon-edit" size="small">编辑</el-button> <el-button type="primary" v-if='w.state==1' @click='w)' icon="el-icon-delete" size="small">删除</el-button>
<el-button type="info" v-if='w.state==1' @click='w)' icon="el-icon-info" size="small">禁⽤</el-button> <el-button type="primary" v-if='w.state==0' plain @click='w)' icon="el-icon-success" size="small">启⽤</el-button>
</template>
</el-table-column>
</el-table>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论