You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
taicangZongzhi/src/components/MyTable/index.vue

76 lines
1.3 KiB

2 years ago
<template>
<div>
<el-table :data="tableList" height="740">
2 years ago
<!-- <el-table-column
label="序号"
type="index"
width="80"
align="center"
2 years ago
/> -->
2 years ago
<el-table-column
v-for="(item,key) in tableKey"
2 years ago
v-if="!item.dictType"
2 years ago
:key="key"
:prop="item.value"
:label="item.name"
2 years ago
align="center"
:show-overflow-tooltip="true"
2 years ago
></el-table-column>
2 years ago
<el-table-column v-else :label="item.name" :show-overflow-tooltip="true">
<template scope="scope">
{{ $filterDict(item.dictType,scope.row[item.value]) }}
</template>
</el-table-column>
2 years ago
</el-table>
</div>
</template>
<script>
export default {
props: {
total: {
type: Number,
default: 0
},
pageNum: {
type: Number,
default: 1
},
pageSize: {
type: Number,
default: 10
},
tableTitle: {
type: String,
default: ''
},
height: {
type: Number,
default: 740
},
tableList: {
type: Array,
default: () => []
},
tableKey: {
type: Array,
default: () => []
}
},
data() {
return {}
},
methods: {
getList() {
console.log(this.pageNum, this.pageSize)
}
}
}
</script>
<style>
</style>