<template>
<!-- <div>权限列表</div> -->
<div>
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column prop="date" label="日期" width="180"> </el-table-column>
<el-table-column prop="name" label="姓名" width="180"> </el-table-column>
<el-table-column prop="address" label="地址">
<template slot-scope="scop">
{{scop.row.address=="1"?"上海市":"普陀区"}}
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: "PermissionList",
data() {
return {
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '1'
}, {
date: '2016-05-04',
name: '王小虎',
address: '2'
}, {
date: '2016-05-01',
name: '王小虎',
address: '1'
}, {
date: '2016-05-03',
name: '王小虎',
address: '1'
}]
}
}
};
</script>
element ui 组件vue组件使用slot-scope=“scop“根据ID改变地址
最新推荐文章于 2023-04-05 08:00:00 发布