调校列表
This commit is contained in:
@@ -62,7 +62,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AiDvTable">
|
<section class="AiDvTable">
|
||||||
<el-table v-if="simple" class="simple" :data="tableData">
|
<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"/>
|
<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>
|
</el-table>
|
||||||
<div v-else class="aiDvTable" :class="'aiDvTable-' + theme + ' aiDvTable-' + size">
|
<div v-else class="aiDvTable" :class="'aiDvTable-' + theme + ' aiDvTable-' + size">
|
||||||
<div class="header" :style="headerStyle">
|
<div class="header" :style="headerStyle">
|
||||||
@@ -44,9 +48,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AiDvTable',
|
name: 'AiDvTable',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
renderSlot: {
|
renderSlot: {
|
||||||
functional: true,
|
functional: true,
|
||||||
@@ -66,7 +70,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -105,7 +108,6 @@ export default {
|
|||||||
},
|
},
|
||||||
simple: Boolean
|
simple: Boolean
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
header: [],
|
header: [],
|
||||||
@@ -116,10 +118,12 @@ export default {
|
|||||||
columns: v => v.header.map((e, i) => {
|
columns: v => v.header.map((e, i) => {
|
||||||
let item = {}
|
let item = {}
|
||||||
Object.values(e).forEach(label => {
|
Object.values(e).forEach(label => {
|
||||||
const {align} = v.config[i]
|
const {align, width, color} = v.config[i]
|
||||||
item.align = align
|
item.align = align
|
||||||
item.prop = `col${i}`
|
item.prop = `col${i}`
|
||||||
item.label = label
|
item.label = label
|
||||||
|
item.width = width
|
||||||
|
item.color = color
|
||||||
})
|
})
|
||||||
return item
|
return item
|
||||||
}),
|
}),
|
||||||
@@ -177,6 +181,10 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "../../dv";
|
@import "../../dv";
|
||||||
|
|
||||||
|
.AiDvTable {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.aiDvTable {
|
.aiDvTable {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user