调校列表

This commit is contained in:
aixianling
2024-03-25 13:48:28 +08:00
parent bffb6d14e0
commit e2c0e919d3
2 changed files with 14 additions and 7 deletions

View File

@@ -62,7 +62,6 @@ export default {
},
data: {
type: Array,
default: () => []
},

View File

@@ -1,7 +1,11 @@
<template>
<section class="AiDvTable">
<el-table v-if="simple" class="simple" :data="tableData">
<el-table-column v-for="item in columns" :key="item.prop" v-bind="item"/>
<el-table v-if="simple" class="simple" :data="tableData" max-height="calc(100% - 40px)">
<el-table-column v-for="item in columns" :key="item.prop" v-bind="item">
<template v-slot="{row}">
<div :style="{color:item.color}" v-text="row[item.prop]"/>
</template>
</el-table-column>
</el-table>
<div v-else class="aiDvTable" :class="'aiDvTable-' + theme + ' aiDvTable-' + size">
<div class="header" :style="headerStyle">
@@ -44,9 +48,9 @@
</template>
<script>
export default {
name: 'AiDvTable',
components: {
renderSlot: {
functional: true,
@@ -66,7 +70,6 @@ export default {
}
}
},
props: {
data: {
type: Array,
@@ -105,7 +108,6 @@ export default {
},
simple: Boolean
},
data() {
return {
header: [],
@@ -116,10 +118,12 @@ export default {
columns: v => v.header.map((e, i) => {
let item = {}
Object.values(e).forEach(label => {
const {align} = v.config[i]
const {align, width, color} = v.config[i]
item.align = align
item.prop = `col${i}`
item.label = label
item.width = width
item.color = color
})
return item
}),
@@ -177,6 +181,10 @@ export default {
<style lang="scss" scoped>
@import "../../dv";
.AiDvTable {
height: 100%;
}
.aiDvTable {
height: 100%;
overflow: hidden;